If running on apache server, make sure to run 0 12 * * * /usr/bin/python3 /var/www/sec_filecheck/app/main.py >> /var/log/mycronlog.log 2>&1 in crontab
This project collects company data from the SEC and provides a web interface for viewing the data.
the 'app' folder contains all of the
app/data/ # Directory for data files company_codes.json filings/ app/database/ # Directory for database files summaries.db app/src/ # Directory for source code files sec_api_client.py file_manager.py database_mgr.py templates/ # Directory for Flask templates index.html
main.py # Script to collect data
app.py # Flask app
requirements.txt # Python dependencies
-
main.py: This script collects data from the SEC. It uses thesec_api_client.py,file_manager.py, anddatabase_mgr.pyfiles in thesrc/directory to fetch and process the data. The data is saved in thedata/anddatabase/directories. -
app.py: This is a Flask app that provides a web interface for viewing the data. It fetches data from thedatabase/summaries.dbdatabase and generates HTML using thetemplates/index.htmltemplate.
- Install the Python dependencies:
pip install -r requirements.txt - Run the data collection script:
python main.py - Start the Flask app:
python app.py