- Python
- FastAPI
- HTTP Basic Auth
- PostgreSQL
- Redis
- Prometheus
- black
- isort
- flake8
- pylint
- pytest
- 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- 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 --buildmake format
make lint- Run docker-compose
docker-compose up -d- Run tests
docker-compose run api make test-
/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