Skip to content

wallaceespindola/python-fastapi-demo

Repository files navigation

fastapi_logo.png

FastAPI Demo Project

A demo on FastAPI: Fast and Modern API Development.

Description

This project is a sample Python FastAPI application that demonstrates:

  • Basic API Endpoints: GET and POST requests.
  • Dependency Injection: Cleaner and modular code.
  • Background Tasks: Non-blocking operations for improved performance.

Features

  • Fast and Efficient: Leverages FastAPI’s asynchronous capabilities.
  • Automatic Documentation: Swagger UI and ReDoc are generated automatically.
  • Type-Checked Validation: Uses Pydantic models for data validation.
  • Modular Design: Easily extendable for larger projects.

Requirements

  • Python 3.10+
  • FastAPI
  • Uvicorn

Installation

  1. Clone the repository:
git clone https://github.com/wallaceespindola/python-fastapi-demo.git
cd python-fastapi-demo
  1. Create a virtual environment:
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt

Running the Application

Start the application with:

uvicorn app.main:app --reload

Open your browser at http://127.0.0.1:8000 to see the API in action.

API Documentation

The interactive API documentation can be checked out at:

Author Information

License

  • This project is released under the Apache 2.0 License.
  • See the LICENSE file for details.
  • Copyright © 2025 Wallace Espindola.

About

A demo on Python FastAPI: Fast & Modern API Development

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published