Skip to content

Latest commit

 

History

History
114 lines (71 loc) · 1.53 KB

File metadata and controls

114 lines (71 loc) · 1.53 KB

FastAPI Starter Pack

This is a simple FastAPI repository for learning and building basic APIs using Python.

Image

Features

  • FastAPI framework
  • Simple REST APIs
  • Automatic Swagger documentation
  • Easy to understand project structure
  • Beginner friendly

Requirements

  • Python 3.8+
  • pip

Installation

Clone the repository

git clone https://github.com/Md-Emon-Hasan/FastAPI
cd FastAPI

Create virtual environment

python -m venv venv

Activate:

venv\Scripts\activate    # Windows
source venv/bin/activate # Mac / Linux

Install dependencies

pip install fastapi uvicorn

Or using requirements file:

pip install -r requirements.txt

Run the App

uvicorn main:app --reload

App will run on:

http://127.0.0.1:8000

API Documentation

FastAPI provides built-in API docs:


Example Endpoint

from fastapi import FastAPI

app = FastAPI()

@app.get("/")
def home():
    return {"message": "Hello FastAPI"}

License

MIT License


Author

Md. Hasan Imon
Email: emon.mlengineer@gmail.com
Github: https://github.com/Md-Emon-Hasan