An API to export data from a Postgres DB to Google Spreadsheet using FastApi, Celery, RabbitMq and The google spreadsheet service.
Python 3.9+
Install the required packages in your local environment (ideally virtualenv, conda, etc.).
pip install -r requirements.txt- Duplicate the
.env.examplefile and rename it to.env - Ask a teammate for the .env file
- run this query: CREATE EXTENSION IF NOT EXISTS tablefunc;
- Start your app with:
source venv/bin/activate;
python3 -m uvicorn app.main:app --reload --port 9009- Go to http://localhost:9009/docs.
docker-compose up rabbitUsing with virtual environment activated
source venv/bin/activate;
celery -A app.core.celery_worker worker --loglevel=infoUsing with virtual environment activated
curl -X POST http://127.0.0.1:9009/api/exports