Day at the office assignment - DevOps Engineer
This is a very simple service for querying and saving trips.
- Python 3 (>= 3.10)
pip install -r requirements.txt
# For local test environments:
export DATABASE_URL="sqlite:///./sqlite.db"
# For other environments:
# export DATABASE_URL = "postgresql://user:password@dbserver/db"
python manage.py --help
export DATABASE_URL=...
python manage.py run
These two scripts need to be run once a day:
python manage.py start-todays-trips
python manage.py end-yesterdays-trips
For tests, the DATABASE_URL
is hardcoded in tests to use a sqlite database.
pytest