Skip to content

dmickelson/FastAPISQLAlchemyProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastAPI SQLAlchemy Project

A modern REST API project built with FastAPI and SQLAlchemy, providing a robust foundation for building scalable web applications.

Project Structure

  • db.py - Database configuration and session management

    • Sets up SQLite database connection
    • Configures SQLAlchemy engine and session
    • Provides database dependency injection
    • Creates Base class for models
  • main.py - Application entry point (to be implemented)

    • FastAPI application initialization
    • API route definitions
    • Server configuration

Technical Stack

  • FastAPI - Modern, fast web framework for building APIs
  • SQLAlchemy - SQL toolkit and ORM
  • Uvicorn - Lightning-fast ASGI server
  • SQLite - Lightweight database

Getting Started

  1. Install dependencies:
pip install fastapi uvicorn sqlalchemy

image

Running the Application

Start the server: python main.py

API Documentation

API documentation is automatically generated by FastAPI. Access it at

  • Swagger UI: http://localhost:8000/docs
  • ReDoc: http://localhost:8000/redoc

Database

The project uses SQLite as the database. The database file is stored in data.db file. The database is automatically created when the application starts. The database configuration can be customized by modifying the db.py file.

About

FastAPI SQLAlchemy Test Project

Topics

Resources

Stars

Watchers

Forks

Languages