Skip to content

Asynchronous REST API built with FastAPI and MySQL for efficient user management.

rahulkumar-fullstack/async-fastapi-mysql-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

22 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Async FastAPI MySQL API

FastAPI Python SQLAlchemy Async Icon

Description

An asynchronous REST API built with FastAPI and MySQL as the database backend. This API provides CRUD operations for users and ensures high-performance, asynchronous database interactions.


Features

  • โšก Fully asynchronous API using FastAPI
  • ๐Ÿ”— Integration with MySQL using SQLAlchemy
  • ๐ŸŒ RESTful API for User CRUD operations

Installation

  1. Clone the repository:

    git clone https://github.com/rahulkumar-fullstack/async-fastapi-mysql-api.git
    cd async-fastapi-mysql-api
    
  2. Create a virtual environment:

    python -m venv venv
    source venv/bin/activate  # Unix
    .\venv\Scripts\activate  # Windows
    
  3. Install dependencies:

    pip install -r requirements.txt

Usage

  1. Start the FastAPI application:

    uvicorn app.main:app --reload
  2. Access the API at http://127.0.0.1:8000


Endpoints

  • Create User: POST /api/v1/users/
  • Get User: GET /api/v1/users/{user_id}
  • Update User: PUT /api/v1/users/{user_id}
  • Delete User: DELETE /api/v1/users/{user_id}
  • List Users: GET /api/v1/users/

Technologies

  • ๐Ÿ Python: The programming language used.
  • ๐Ÿ”ง FastAPI: A modern web framework for building APIs.
  • ๐ŸŒฑ MySQL: Database system used for storage.
  • ๐Ÿ—๏ธ SQLAlchemy: ORM tool for managing the database interactions.
  • ๐Ÿš˜ Asyncmy: Async MySQL driver

About

Asynchronous REST API built with FastAPI and MySQL for efficient user management.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages