Eshajha19/FastAPI-learning

โ˜… 0Forks 0PythonGitHub โ†—Compare

README

๐Ÿš€ FastAPI Learning

A personal repository for learning and practicing FastAPI, a modern, high-performance Python web framework for building APIs.


๐Ÿ“Œ About

This repository contains my FastAPI learning journey, including:

  • FastAPI basics
  • Routing and path parameters
  • Query parameters
  • Request and response models
  • Pydantic validation
  • CRUD APIs
  • Dependency Injection
  • Database integration
  • Authentication & Authorization
  • File uploads
  • Middleware
  • Background tasks
  • Deployment

๐Ÿ› ๏ธ Tech Stack

  • Python 3.13
  • FastAPI
  • Uvicorn
  • Pydantic

๐Ÿ“ Project Structure

FastApi Learning/
โ”‚โ”€โ”€ venv/
โ”‚โ”€โ”€ main.py
โ”‚โ”€โ”€ README.md

โš™๏ธ Installation

1. Clone the repository

git clone <repository-url>
cd "FastApi Learning"

2. Create a virtual environment

python -m venv venv

3. Activate the virtual environment

Windows (PowerShell)

.\venv\Scripts\Activate.ps1

Windows (Command Prompt)

venv\Scripts\activate

macOS/Linux

source venv/bin/activate

4. Install dependencies

pip install fastapi uvicorn

โ–ถ๏ธ Run the Application

uvicorn main:app --reload

Server will start at:

http://127.0.0.1:8000

๐Ÿ“š API Documentation

FastAPI automatically generates interactive API documentation.


๐Ÿ“ Sample Code

from fastapi import FastAPI

app = FastAPI()

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

๐ŸŽฏ Learning Goals

  • Learn FastAPI fundamentals
  • Build REST APIs
  • Perform CRUD operations
  • Use Pydantic models
  • Connect to a database
  • Implement JWT Authentication
  • Handle file uploads
  • Write unit tests
  • Deploy FastAPI applications

๐Ÿ“– Resources


๐Ÿ“„ License

This project is created for educational purposes and personal learning.

Contributors

Eshajha19

Issues