Skip to content

Latest commit

 

History

History
42 lines (32 loc) · 1.37 KB

File metadata and controls

42 lines (32 loc) · 1.37 KB

Comet Starter API

This project is a starter template for building web APIs using Python FastAPI.

Project Features

This project is built using the following tools and libraries:

  • FastAPI for building the API
  • SQLAlchemy for database interactions
  • Alembic for database migrations
  • Pydantic for data validation
  • PyTest for unit testing
  • Swagger and ReDoc for API documentation

Development Guidelines

  • Follow the established directory structure for organizing your code
  • Use snake_case for variable and function names
  • Use __init__.py files for new modules
  • Use Pydantic models for request and response validation
  • Use SQLAlchemy for database interactions
  • Use Alembic for managing database schema changes
  • Document your API endpoints using Swagger and ReDoc
  • Ensure code quality by using Ruff, PyLint, Black, and isort
  • Implement JWT authentication for protected routes
  • Write unit tests for all new features and bug fixes

Unit Testing

  • Use PyTest for writing and running unit tests
  • Organize tests in a separate tests directory
  • Write tests for all public functions and methods
  • Use fixtures for setup and teardown of test environments

Code Quality

  • Use Ruff for linting and code style checks
  • Use PyLint for static code analysis
  • Use Black for automatic code formatting
  • Use isort for sorting imports
  • Aim for clean, readable, and maintainable code