Skip to content

Part of the project (Wise) that won 1st place at the PHEE TECH Hackathon.

Notifications You must be signed in to change notification settings

ForceFinity/BDZMS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

BDZMS – Python Microservice

BDZMS is a Python microservice that wraps the BDZ.bg API, providing endpoints to fetch data related to the Bulgarian state railway company BDZ. This microservice uses FastAPI and utilizes the ms_core library, which is a toolkit I wrote for building HTTP microservices with FastAPI, Pydantic, and TortoiseORM.

This service is part of the transport tracking platform, integrating with the BurgasBusMS for a complete transport tracking solution.

Features

  • Wraps BDZ.bg API to provide railway data such as train schedules, routes, and station information.
  • Built with FastAPI for fast, asynchronous handling of HTTP requests.
  • Integrated with ms_core for simplified microservice development.
  • Uses TortoiseORM with asyncpg for efficient database handling.

πŸ›  Stack

FastAPI, Pydantic, TortoiseORM, ms_core, asyncpg, uvicorn, aiohttp

πŸš€ Startup Guide

  1. Install dependencies:

    pip install -r requirements.txt 
  2. Start the microservice:

    uvicorn main:app --reload 
  3. Build for production:

    uvicorn main:app --host 0.0.0.0 --port 8000 

The microservice will be accessible at http://localhost:8000 by default.

πŸ“‘ API Communication

The microservice handles API requests through FastAPI endpoints, processes them, and communicates with external services using aiohttp. It uses ms_core for simplified interactions with databases and external APIs.

πŸ§ͺ Testing

  • The microservice includes unit tests to ensure data processing and API communication work correctly. You can run tests using pytest.

You can also explore the frontend of this project here: WiseFrontendLegacy.

About

Part of the project (Wise) that won 1st place at the PHEE TECH Hackathon.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages