๐Ÿš€ FastAPI Notes API

A production-ready asynchronous REST API built with FastAPI

FastAPI Python Docker

โœจ Features

๐Ÿš€ Async API

Built with FastAPI and async/await patterns for high performance

๐Ÿ˜ PostgreSQL

Production-grade database with asyncpg driver

๐Ÿ” Search & Filter

Advanced search, filtering, and pagination support

๐Ÿ“ CRUD Operations

Complete Create, Read, Update, Delete functionality

๐Ÿณ Docker Ready

Fully containerized with Docker Compose

๐Ÿงช Well Tested

Comprehensive test suite with 30+ tests

๐Ÿ“š Auto Docs

Interactive OpenAPI/Swagger documentation

๐ŸŽจ Vue Frontend

Optional modern frontend with Vite

๐Ÿš€ Quick Start

Get started with Docker in 3 simple steps:

# Clone the repository
git clone https://github.com/KenMwaura1/Fast-Api-example.git
cd Fast-Api-example

# Start with Docker Compose
docker-compose up -d --build

# Access the API
# API: http://localhost:8002/notes
# Docs: http://localhost:8002/docs

๐Ÿ“ก API Endpoints

The API provides the following endpoints:

  • GET /notes - List all notes with optional filtering and pagination
  • POST /notes - Create a new note
  • GET /notes/{id} - Get a specific note
  • PUT /notes/{id} - Update a note
  • DELETE /notes/{id} - Delete a note
  • GET /ping - Health check endpoint

๐Ÿ› ๏ธ Tech Stack

  • Framework: FastAPI 0.115.8
  • Python: 3.13
  • Database: PostgreSQL with asyncpg
  • ORM: SQLAlchemy 1.4.50
  • Server: Uvicorn with uvloop
  • Testing: pytest 7.4.3
  • Frontend: Vue 3 + Vite

๐Ÿค Contributing

Contributions are welcome! Please check out the Contributing Guide for guidelines.

# Fork and clone the repo
git clone https://github.com/YOUR_USERNAME/Fast-Api-example.git

# Create a feature branch
git checkout -b feature/amazing-feature

# Make your changes and test
pytest src -v

# Commit and push
git commit -m "feat: add amazing feature"
git push origin feature/amazing-feature

๐Ÿ“– Resources