Skip to content

Latest commit

 

History

History
56 lines (39 loc) · 1.35 KB

File metadata and controls

56 lines (39 loc) · 1.35 KB

FastAPI Simple Project

A lightweight, modular FastAPI project using Poetry and a Hexagonal Architecture approach for clean separation of concerns.


Features

  • FastAPI as the web framework
  • Hexagonal architecture (domain, application, infrastructure layers)
  • Pytest for testing
  • SQLAlchemy ready (DB adapter)
  • Dependency management via Poetry

Pre-requisites

Before getting started, make sure you have:

  • Python 3.11
  • Poetry installed
    (Recommended install method: brew install poetry or use the official installer)
# Install Poetry (if not already)
brew install poetry
# OR
curl -sSL https://install.python-poetry.org | python3 -

🚀 Running the Application

After installing dependencies, you can start the FastAPI server using Uvicorn.

1. Install dependencies

If you haven’t already, run:

poetry install

2. Start the server

Run the following command from the project root:

PYTHONPATH=src uvicorn main:app --reload
  • PYTHONPATH=src ensures that internal modules (like api, services, etc.) are correctly resolved.
  • --reload enables automatic reload on code changes (useful during development).

The app will be available at: