The purpose of this project is to automatically generate an HTML template with finanacial information and send it by email to a list of contacts.
- Installed python
- Basic knowledge of Unix/Linux Shell commands
- Clone repository
git clone [email protected]:benjaminlozanow/financial_email_bot.git
- Install requirements
pip install -r requirements.txt
-
Log into Yahoo Finance API and get you API key and copy it to a file with environmental variables.
-
The same file with environmental variables must contain the sender email address and the list of recievers email addresses.
-
Enable your gmail account to send emails though python with the following guide.
-
generate_email.py is a script that consumes the Yahoo Finance API extracting information about stock, indexes and cryptocurrencies. This data is used to edit the template HTML file base_email.html.
-
email_bot.py is a script that sends an email containing the previously generated HTML (out_email.html) to a list of contacts.
Run following shell commands in your local repository:
python generate_email.py
python email_bot.py
Feel free to optimize/modify the code to have better or different results.