FastAPI server for searching Kyoto City Bus routes using GTFS (General Transit Feed Specification) data.
- 🚌 Bus Route Search: Find direct routes between two stops with departure times.
- 💰 Fare Information: Get fare prices and stop counts for each route.
- 📍 Nearby Stops: Find bus stops near your GPS location.
- 🕒 Timetable: View schedules for specific stops.
- 👁️ Bus Location: Estimate bus current location based on schedule.
- 🚏 Boarding Assistance: Track the 3 stops before your boarding location.
- ⚡ Fast Response: GTFS data preloaded in memory.
- 📖 Full Documentation: See API Documentation.
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtDownload Kyoto City Bus data:
python update_gtfs_data.pycp .env.example .env
# Edit .env and set your API_KEYpython main.pyServer will start at http://localhost:8000.
- API Specification: Detailed endpoint reference.
- Deployment Guide: Production setup instructions.
- Interactive Docs: Visit
/kcb_api/docsin your browser when running.
kcb_api/
├── main.py # FastAPI application
├── bus_route_search.py # Core logic
├── auth.py # Authentication
├── config.py # Settings
├── docs/ # Documentation
└── data/ # GTFS data storage
- FastAPI
- Uvicorn
- Pydantic
- GTFS
MIT License