Skip to content

REST API example for sensors data made with FastAPI and Tortoise ORM connected with PostreSQL DB

License

Notifications You must be signed in to change notification settings

LuxerIThink/sensors-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📡 SensorsAPI

Python Async RESTful API built using FastAPI and Tortoise ORM, designed to manage sensor data with PostgreSQL database.

❇️ Key features:

  • good api documentation (Swagger UI made by FastAPI) 📄
  • transactional operations and support for different databases (Tortoise ORM) 🗄
  • easy deployment and scalability with Docker and Docker Compose 🚚
  • models fields verification (Pydantics) 🖊
  • user authentication (OAuth2) 🔑
  • passwords encryption (Argon2) 🔒
  • Docker container healthcheck ❤️
  • testing with PyTest in test SQLite DB (not on production DB) ✅

🛂 Requirements:

  • Internet connection (to build) 📶
  • Docker 📦
  • Docker Compose 🚛
  • WSL (on Windows) 💻

⚙️ Build and run

  1. set enviromental variables like:
  • DB_NAME
  • DB_USER
  • DB_PASSWORD
  • JWT_SECRET
  1. Run command:
docker compose up

✅ Testing

Run this command in project files inside docker container:

python3 -m pytest

About

REST API example for sensors data made with FastAPI and Tortoise ORM connected with PostreSQL DB

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published