Skip to content

El-Despatx/cloud-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API

Small FastAPI service for managing users.

Features

  • Create users (stores hashed password)
  • List users

Endpoints

  • POST /users
    • Request body: UserCreate { "username", "name", "role", "password" }
    • Response: UserPublic { "id", "username", "name", "role" }
    • Implementation: routers.user.create_user
  • GET /users

Database

  • Dev: SQLite file database.db (see api/db/db.py)
  • Prod: set environment variables DB_USER, DB_PASSWORD, DB_HOST, DB_PORT, DB_NAME and PROD=true
  • DB initialization is performed by db.db.create_db_and_tables at app startup.

Local development

  1. Sync dependencies
uv sync
  1. Run app:
uv run fastapi run
  1. Access the API docs at http://localhost:8000/docs

Files and submission

  • Place your Dockerfile on this directory.
  • Place your docker-compose.yml on this directory.
  • Place your report for 4.3 on this directory.
  • Place your report for 4.4 on this directory.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages