This project is a continuation of the Contacts REST API developed in previous assignments.
The main goal of Homework 14 is to:
- Create project documentation using Sphinx.
- Add docstrings to key modules and functions.
- Implement unit tests for repository and authentication functionality.
- Generate documentation automatically from source code.
- Create contacts
- Read contacts
- Update contacts
- Delete contacts
- Search contacts
- View upcoming birthdays
- User registration
- User login
- JWT access tokens
- JWT refresh tokens
- Password hashing and verification
- Email confirmation
- Cloudinary avatar support
- Email service integration
- PostgreSQL database support
- SQLAlchemy ORM
The project documentation was generated using Sphinx.
To build the documentation:
cd docs
make htmlOn Windows:
cd docs
.\make.bat htmlGenerated HTML files are available in:
docs/build/html
Repository and authentication modules are covered by automated tests.
Run all tests:
pytest -vRun coverage:
pytest --cov=.Run unittest authentication tests:
python -m unittest discover -s tests -p "test_unit_auth.py" -v├── auth.py
├── cloudinary_service.py
├── crud.py
├── database.py
├── email_service.py
├── main.py
├── models.py
├── schemas.py
├── tests/
│ ├── test_crud.py
│ └── test_unit_auth.py
├── docs/
├── templates/
├── requirements.txt
└── README.md
- Python 3
- FastAPI
- SQLAlchemy
- PostgreSQL
- JWT Authentication
- Cloudinary
- Pytest
- Unittest
- Sphinx
Lesya Sakhnovska
GoIT Python Web Homework 14