Skip to content

arindam31/fastapi_Realtime_GPS_tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Realtime Vehicle Tracker with FastAPI

Python FastAPI

Features:

🚕 Real-Time GPS Tracking (Vehicles send location data continuously)
🚕 WebSockets for Instant Updates (No polling, low latency)
🚕 Historical Route Storage & Playback
🚕 Geofencing & Alerts (Triggers events when vehicles enter/exit zones)
🚕 Dashboard for Visualization
🚕 Scalable API for High Load (Thousands of concurrent vehicle updates)
🚕 Efficient Data Processing

Backend System Architechture

  • Receives location changes via REST/Websockets from vehicles.
  • Data stored in PostgreSQL and PostGIS (for GeoSpatial data)

Tech Stack:

  • Python 3.12
  • FastAPI
  • Pydantic

Setup virtual env

  • For local development setup: use> requirements/local.txt
  • For testing setup: use> requirements/testing.txt
  • For production development setup: use> requirements/production.txt

Quick Start (Windows)

  • Clone the repo.

  • Create virtual env and activate it.

    python -m venv .venv
  • Create a .env file and add the following (at root):

    ENV=local  
    SQLALCHEMY_DATABASE_URI=postgresql+asyncpg://[username]:[password]@localhost:5432/[db name]
    DEBUG=True  
    SECRET_KEY=mySecretkeY  
  • If you are using VS code, there is config already provided. Press F5.

  • Else, use uvicorn

    uvicorn app.main:app

Trying APIs with Swagger docs

Visit the url host:8001/docs and host:8001/redoc

Using custom commands

There are CLI commands availaible for certain actions You can find them by:

python -m app.cli --help

About

FASTApi project for GPS tracking of vehicles

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors