|
|
@ -1,8 +1,8 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
import os |
|
|
|
import os |
|
|
|
import click |
|
|
|
import click |
|
|
|
import dotenv |
|
|
|
|
|
|
|
import logging |
|
|
|
import logging |
|
|
|
|
|
|
|
from dotenv import find_dotenv, load_dotenv |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@click.command() |
|
|
|
@click.command() |
|
|
@ -17,9 +17,12 @@ if __name__ == '__main__': |
|
|
|
log_fmt = '%(asctime)s - %(name)s - %(levelname)s - %(message)s' |
|
|
|
log_fmt = '%(asctime)s - %(name)s - %(levelname)s - %(message)s' |
|
|
|
logging.basicConfig(level=logging.INFO, format=log_fmt) |
|
|
|
logging.basicConfig(level=logging.INFO, format=log_fmt) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# not used in this stub but often useful for finding various files |
|
|
|
project_dir = os.path.join(os.path.dirname(__file__), os.pardir, os.pardir) |
|
|
|
project_dir = os.path.join(os.path.dirname(__file__), os.pardir, os.pardir) |
|
|
|
dotenv_path = os.path.join(project_dir, '.env') |
|
|
|
|
|
|
|
dotenv.load_dotenv(dotenv_path) |
|
|
|
# find .env automagically by walking up directories until it's found, then |
|
|
|
|
|
|
|
# load up the .env entries as environment variables |
|
|
|
|
|
|
|
load_dotenv(find_dotenv()) |
|
|
|
|
|
|
|
|
|
|
|
main() |
|
|
|
main() |
|
|
|
|
|
|
|
|
|
|
|