REST API for online library. It supports authors of books and books resources including Oauth2 authentication (JWT Token).
The documentation can be found in documentation.html or here
- Clone repository
- Create database and user
- Rename .env.example to .env and set your values
SQLALCHEMY_DATABASE_URL=f"mysql+mysqlconnector://{settings.database_username}:{settings.database_password}@{settings.database_hostname}:{settings.database_port}/{settings.database_name}"
- Create a virtual environment
python -m venv venv - Activate virtual environment (in VsCode)
source venv/bin/activate - Install packages from requirements.txt
pip install -r requirements.txt - Migrate database
alembic upgrade head - Run server by command
uvicorn app.main:app --reload - Load sample data
In order to execute tests located in tests
run the command:
python -m pytest tests/
- Python 3.10
- FastApi
- alembic 1.9.2
- SQLAlchemy 1.4.46
- pytest==7.2.1
- MySQL
- Heroku
- Postman