Automated Action 86a4793cce Enhance FastAPI application setup
- Added environment variable support via .env file
- Updated API routes with versioning prefix
- Improved documentation in README
- Enhanced SQLite database path configuration

generated with BackendIM... (backend.im)
2025-05-13 10:15:27 +00:00
2025-05-13 10:15:27 +00:00
2025-05-13 10:15:27 +00:00
2025-05-13 10:15:27 +00:00
2025-05-13 10:15:27 +00:00
2025-05-13 10:15:27 +00:00

Simple Todo App

A simple Todo application built with FastAPI and SQLite.

Features

  • Create, read, update, and delete todo items
  • Filter todos by completion status
  • RESTful API with OpenAPI documentation
  • SQLite database with SQLAlchemy ORM
  • Alembic for database migrations
  • Environment variable configuration support

Project Structure

.
├── alembic/                  # Database migration scripts
├── app/                      # Application code
│   ├── api/                  # API endpoints
│   │   ├── v1/               # API version 1
│   │   │   └── endpoints/    # API endpoints
│   ├── core/                 # Core application code
│   ├── crud/                 # CRUD operations
│   ├── db/                   # Database setup
│   ├── models/               # SQLAlchemy models
│   └── schemas/              # Pydantic schemas
├── main.py                   # Application entry point
├── alembic.ini               # Alembic configuration
└── requirements.txt          # Dependencies

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/simpletodoapp.git
cd simpletodoapp
  1. Install dependencies:
pip install -r requirements.txt
  1. Configure environment variables (optional): Create a .env file with your configuration options

  2. Run database migrations:

alembic upgrade head

Usage

  1. Start the server:
uvicorn main:app --reload
  1. Access the API documentation at:

API Endpoints

All API endpoints are prefixed with /api/v1

  • GET /api/v1/todos: Get all todos
  • GET /api/v1/todos/{id}: Get a specific todo
  • POST /api/v1/todos: Create a new todo
  • PUT /api/v1/todos/{id}: Update a todo
  • DELETE /api/v1/todos/{id}: Delete a todo

Health Check

  • GET /health: Health check endpoint

License

MIT

Description
Project: Simple Todo App
Readme 37 KiB
Languages
Python 95.8%
Mako 4.2%