Skip to content

Repository files navigation

GoIT Python Web Homework 14

Description

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.

Features

Contacts Management

  • Create contacts
  • Read contacts
  • Update contacts
  • Delete contacts
  • Search contacts
  • View upcoming birthdays

Authentication

  • User registration
  • User login
  • JWT access tokens
  • JWT refresh tokens
  • Password hashing and verification
  • Email confirmation

Additional Features

  • Cloudinary avatar support
  • Email service integration
  • PostgreSQL database support
  • SQLAlchemy ORM

Documentation

The project documentation was generated using Sphinx.

To build the documentation:

cd docs
make html

On Windows:

cd docs
.\make.bat html

Generated HTML files are available in:

docs/build/html

Testing

Repository and authentication modules are covered by automated tests.

Run all tests:

pytest -v

Run coverage:

pytest --cov=.

Run unittest authentication tests:

python -m unittest discover -s tests -p "test_unit_auth.py" -v

Project Structure

├── 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

Technologies

  • Python 3
  • FastAPI
  • SQLAlchemy
  • PostgreSQL
  • JWT Authentication
  • Cloudinary
  • Pytest
  • Unittest
  • Sphinx

Author

Lesya Sakhnovska

GoIT Python Web Homework 14

About

FastAPI Contacts REST API with Sphinx documentation, unit tests, functional tests, JWT authentication, and PostgreSQL.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages