OASA API Wrapper
This Python package provides a convenient wrapper for interacting with the OASA S.A. (Athens Public Transport) API, allowing users to retrieve various information related to the public transport network in Athens, Greece.
The OASA S.A. API provides access to information such bus lines, schedules, routes, stops, arrivals, and bus locations. The information obtained through this package corresponds to the data available on the OASA S.A. website, providing users with a programmatic way to access the same data.
Installation
You can install the package via pip:
pip install oasa-api
Usage
To use the package, simply import the OASAApi class from the oasa_api module and create an instance of it. Then, you can call various methods to retrieve information from the OASA API.
Here's an example of how to retrieve information about lines with master line info:
from oasa_api import OASAApi
# Create an instance of OASAApi
oasa_api = OASAApi()
# Retrieve information about lines with master line info
lines_with_master_line_info = oasa_api.get_lines_with_master_line_info()
print(lines_with_master_line_info)
For more detailed usage examples, please refer to the demo notebook.
Available Methods
get_master_lines()get_master_line_name(ml_code: int)get_lines_with_master_line_info()get_lines_and_routes_for_master_line_and_line_code(ml_code: int, line_code: int)get_lines()get_line_name(line_code: int)get_schedule_days_master_line(line_code: int)get_daily_schedule(line_code: int)get_sched_lines(ml_code: int, sdc_code: int, line_code: int)get_routes(line_code: int)get_routes_for_line(line_code: int)get_route_name(route_code: int)get_routes_details_and_stops(route_code: int)get_route_details(route_code: int)get_stops(route_code: int)get_routes_for_stops(stop_code: int)get_stop_name_and_xy(stop_code: int)get_closest_stops(lng: float, lat: float)get_stop_arrivals(stop_code: int)get_bus_location(route_code: int)
For detailed information about each method, refer to the documentation in the source code.
Contributing
Contributions are welcome! If you encounter any issues or have suggestions for improvements, please open an issue or submit a pull request.
Acknowledgements
Special thanks to Pretzel for writing a helpful tutorial on creating Python SDK libraries for REST APIs, and to ChatGPT for assisting with the documentation.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for oasa-api 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| oasa_api-0.1.1.tar.gz | 8.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| oasa_api-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.9 kB
Release files / oasa_api-0.1.1.tar.gz
| Download URL | oasa_api-0.1.1.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
79d8bf9cf21563cc7fee15847edaac6aed58a02708e07d4e746a3465c4f1d20b
|
|
BLAKE2b-256 checksum How to use checksums |
6c42661302544fea4310d59b29f7dd947677a4cc61f3fdc4db88f65afa55b0e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / oasa_api-0.1.1-py3-none-any.whl
| Download URL | oasa_api-0.1.1-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c3771faebb70e6a872678a6a4e4df31b14710018e019a52df3c6449dd4bfbdea
|
|
BLAKE2b-256 checksum How to use checksums |
1eecaa8ce9e54601887798099fdb489242a2cde516c28c7960f18e2d58be322c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|