Official Python SDK for the Metro Route Premium API.
Project description
Metro Route SDK (Python)
The official Python client library for the Delhi & Noida Metro Premium API.
Installation
pip install metro-route-sdk
Usage
This SDK provides both synchronous and asynchronous clients.
Synchronous Client
from metro_route import MetroRouteClient
# Initialize the client
client = MetroRouteClient()
# Get all operating lines
lines = client.get_lines()
print(lines)
# Plan a Noida Metro journey
journey = client.plan_nmrc_journey(from_station_id="1", to_station_id="16")
print(journey)
Asynchronous Client
import asyncio
from metro_route import AsyncMetroRouteClient
async def main():
# Use async context manager for proper connection pooling
async with AsyncMetroRouteClient() as client:
# Get Noida Metro stations
stations = await client.get_nmrc_stations()
print(stations)
# Plan a DMRC journey
journey = await client.plan_journey(from_station="RG", to_station="DW21")
print(journey)
asyncio.run(main())
Available Methods
get_lines()get_stations_by_line(line_code: str)search_stations(name: str)get_station_details(station_code: str)plan_journey(from_station: str, to_station: str)get_notifications()get_nmrc_stations()plan_nmrc_journey(from_station_id: str, to_station_id: str)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
metro_route_sdk-0.1.0.tar.gz
(2.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file metro_route_sdk-0.1.0.tar.gz.
File metadata
- Download URL: metro_route_sdk-0.1.0.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cef5bf7e4b326a6a606a623278648ca21de20eb1e2b946d9b1af6bec85cd4142
|
|
| MD5 |
e214cf864160d04b1ff4e0bdff2b9788
|
|
| BLAKE2b-256 |
d9682a72b56a4362edf2ef5e2e0d63e987b092889d0b54f03ceb6423a2e4ec95
|
File details
Details for the file metro_route_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: metro_route_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9858eacebdcc5e6703672a26bb165b6fcab89909bd4fac074df337cb95efe1bd
|
|
| MD5 |
2da530dca4bfbd8f5c3f2ae093e51026
|
|
| BLAKE2b-256 |
e9c17a8892d38b8ab7b676c497dcaa6cba2234b99cf99845a40b19f3e93da9cf
|