Glider
|
Functions | |
get_month (date) | |
build_csv (event) | |
Constants | |
f_path = __file__ | |
index = f_path.find("report_generation/") | |
mongo_conn = mongo_connection() | |
Class to connect to mongodb. | |
collection = mongo_conn.mongo_conn_sales() | |
Mongo collection to consult sales. | |
ROOT_DIR = os.path.expanduser('~') | |
Sets the root path. | |
str | path = ROOT_DIR+"/Reports/" |
Creates the folder when reports will be saved. | |
src.report_generation.GenReport.build_csv | ( | event | ) |
Generates the compressed csv file according to sales which matches with 'accounting_date' field Args: event (dict): It contains necessary info related to sales and client Returns: Nothing.
Definition at line 50 of file GenReport.py.
src.report_generation.GenReport.get_month | ( | date | ) |
Generate the filename according to date in 'MonthYear' format. Args: date (str): accounting date, i.e processing files date Returns: full_date (str)
Definition at line 33 of file GenReport.py.
src.report_generation.GenReport.collection = mongo_conn.mongo_conn_sales() |
Mongo collection to consult sales.
Definition at line 24 of file GenReport.py.
src.report_generation.GenReport.f_path = __file__ |
Definition at line 14 of file GenReport.py.
src.report_generation.GenReport.index = f_path.find("report_generation/") |
Definition at line 15 of file GenReport.py.
src.report_generation.GenReport.mongo_conn = mongo_connection() |
Class to connect to mongodb.
Definition at line 22 of file GenReport.py.
str src.report_generation.GenReport.path = ROOT_DIR+"/Reports/" |
Creates the folder when reports will be saved.
Definition at line 29 of file GenReport.py.
src.report_generation.GenReport.ROOT_DIR = os.path.expanduser('~') |
Sets the root path.
Definition at line 27 of file GenReport.py.