Skip to content

FastAPI app with the ability to upload a report in Google Sheets

Notifications You must be signed in to change notification settings

Zorik28/QRkot_spreadsheets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QRkot_spreadsheets

Description

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.

Technologies

  • 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

Environment

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=...

Project run on local server

  1. Install the virtual environment: py -m venv venv
    Activate: . venv/Scripts/activate

  2. Upgrade pip version: py -m pip install --upgrade pip
    Install dependencies from requirements.txt: pip install -r requirements.txt

  3. Apply the migrations: alembic upgrade head

  4. Run the app! uvicorn app.main:app --reload

Request examples

http://127.0.0.1:8000/docs

Author

Karapetian Zorik
Russian Federation, St. Petersburg, Kupchino.

About

FastAPI app with the ability to upload a report in Google Sheets

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published