Skip to content

LuxerIThink/sensors-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

134 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📡 SensorsAPI

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

📦 DB Structure:

Sensors API DB Strudture

❇️ Key features:

  • FastAPI async RESTful API 📄
  • Tortoise ORM async transactional PostgreSQL management 🗄
  • Docker and Docker Compose easy deployment 🚚
  • Pydantics models fields verification 🖊
  • OAuth2 user authentication 🔑
  • Argon2 passwords encryption 🔒
  • Docker container healthcheck ❤️
  • PyTest automatic tests with mock SQLite3 database ✅
  • Extended searching options by parameters for GET requests 🔎
  • Preview shared devices and their children 🔗

🛂 Requirements:

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

⚙️ Build and run

  1. Set environmental variables:
  • DB_NAME
  • DB_USER
  • DB_PASSWORD
  • JWT_SECRET
  1. Run command:
docker compose up

✅ Testing and Coverage

Run this command inside docker container:

pytest --cov=.

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

 
 
 

Contributors