- This app read a .csv file that contains trx information, send a formatted email with this content and load the information into a Mongodb cluster.
- Info will be stored this way (in a json file) :
{"_id":{"$oid":"631f4bdfb01fc30b3d3345ae"},"user_name":"TESTING","trx_qtty":[0,0,0,0,0,0,2,2,0,0,0,0],"debit":[0,0,0,0,0,0,-10.3,-20.46,0,0,0,0],"credit":[0,0,0,0,0,0,60.5,10.0,0,0,0,0],"email_date":"12/09/2022 15:10:23"}
- Mongodb
- Docker
- Docker compose
- Python 3.8.10
- Poetry
https://hub.docker.com/repository/docker/romibareiro/stori01
Or
pip install trx-reader-demo
Or
pip3 install -r requirements.txt
Create an .env file with this content:
CSV_PATH=CSV_PATH
SENDER_EMAIL=SENDER_EMAIL
DEST_EMAIL=DEST_EMAIL
EMAIL_PWD=EMAIL_PWD
USER_NAME=USER_NAME
MONGODB_CONNSTRING=MONGODB_CONNSTRING
python3 main.py
Note: if your email sender is a gmal account, you must get app password from gmail settings. If you want to build the docker image, you need to change the flags values in .env ( PATH_TO_CSV, EMAIL_SENDER, EMAIL_DESTINATION,EMAIL_SENDER_PWD,USER_NAME)