Skip to content

nikitunkun/FastAPIUsers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastAPI Users

Technologies

Basic

  • Python
  • FastAPI
  • HTTP Basic Auth
  • PostgreSQL
  • Redis
  • Prometheus

Code Style

  • black
  • isort
  • flake8
  • pylint

Tests

  • pytest

Installation

  • Clone the GitHub repository
// http:
git clone https://github.com/nikitunkun/FastAPIUsers.git
// ssh:
git clone [email protected]:nikitunkun/FastAPIUsers.git
  • Navigate to the project folder
cd FastAPIUsers

Usage

  • Configure .env.dist
Environment variable Value
POSTGRES_HOST PostgreSQL Host
POSTGRES_PORT PostgreSQL Port
POSTGRES_USER PostgreSQL Username
POSTGRES_PASSWORD PostgreSQL Password
POSTGRES_DB PostgreSQL Database Name
REDIS_HOST PostgreSQL Password
REDIS_PORT PostgreSQL Database Name
  • Copy .env.dist to .env
cp .env.dist .env
  • Run
docker-compose up --build

Linters and Formatter

make format
make lint

Tests

  • Run docker-compose
docker-compose up -d
  • Run tests
docker-compose run api make test

Endpoints

  • /docs Swagger Scheme

  • /redoc Swagger Scheme

  • /metrics Prometheus Metrics

  • /dummy [ GET ] Health-Check

  • /user/create [ POST ] Create User

  • /user/find [ GET ] Find Users by username

  • /user/ [ GET ] Get user by ID or get authorized User info

  • /user/ [ PUT ] Update User info

  • /user/ [ DELETE ] Delete User

Enjoy 🙃

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published