The application for the Charitable Foundation for Supporting Kittens. The QRkot Foundation can have multiple projects. Each project has a name, description and amount to be raised. After the required amount is collected, the project is closed.
Donations to projects are received according to the First In, First Out principle: all donations go to the project opened earlier than others; when this project collects the required amount and closes, donations begin to flow into the next project.
The QRkot application has the ability to generate a report in Google Sheets.
- Python 3.9.6
- FastAPI 0.78.0
- Uvicorn[standard] 0.17.6
- SQLAlchemy 1.4.36
- Alembic 1.7.7
- aiogoogle 4.2.0
Create an .env file and write the following:
DATABASE_URL=<exmp: 'sqlite+aiosqlite:///./fastapi.db'>
SECRETE=<some secret word>
FIRST_SUPERUSER_EMAIL=...
FIRST_SUPERUSER_PASSWORD=...
EMAIL=<your e-mail>
To work with Google API add from JSON-key:
TYPE=...
PROJECT_ID=...
PRIVATE_KEY_ID=...
PRIVATE_KEY=...
CLIENT_EMAIL=...
CLIENT_ID=...
AUTH_URI=...
TOKEN_URI=...
AUTH_PROVIDER_X509_CERT_URL=...
CLIENT_X509_CERT_URL=...
-
Install the virtual environment:
py -m venv venv
Activate:. venv/Scripts/activate
-
Upgrade pip version:
py -m pip install --upgrade pip
Install dependencies from requirements.txt:pip install -r requirements.txt
-
Apply the migrations:
alembic upgrade head
-
Run the app!
uvicorn app.main:app --reload
Karapetian Zorik
Russian Federation, St. Petersburg, Kupchino.