Skip to content

j03-dev/bus_antsirabe_api

Repository files navigation

Bus Antsirabe API

A simple REST API for retrieving bus line and travel information for Antsirabe.

Endpoints

GET /api/travel

Returns a list of all available travels with their IDs and names.

Response format:

{
  "travel_id": "travel_name"
}

POST /api/travel

Find bus lines between two points.

Request body:

{
  "primus": "starting_point_id",
  "terminus": "destination_id"
}

Response format:

["bus_line_1", "bus_line_2"]

Running locally

  1. Clone the repository
  2. Install dependencies: pip install oxhttp
  3. Run the server: python main.py
  4. API will be available at http://localhost:8080

Data

Bus line data is stored in travel.json and loaded on startup.

Releases

No releases published

Packages

No packages published