oasa-api


Nameoasa-api JSON
Version 0.1.1 PyPI version JSON
download
home_pageNone
SummaryThis Python package provides a convenient wrapper to interact with the OASA S.A. (Athens Public Transport) API, allowing users to retrieve various information related to the public transport network in Athens, Greece.
upload_time2024-06-24 14:59:43
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseMIT License Copyright (c) 2024 Romain Derollepot Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords api data public transport athens timetables
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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](https://www.oasa.gr/en/),
providing users  with a programmatic way to access the same data.

## Installation

You can install the package via pip:

```bash
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:

```python
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](./demo.ipynb).

## 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](https://www.pretzellogix.net/2021/12/08/how-to-write-a-python3-sdk-library-module-for-a-json-rest-api/)
on creating Python SDK libraries for REST APIs, and to [ChatGPT](https://chat.openai.com/)
for assisting with the documentation.

## License

This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "oasa-api",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "API, data, public transport, Athens, timetables",
    "author": null,
    "author_email": "Romain DEROLLEPOT <romain.derollepot@univ-eiffel.fr>",
    "download_url": "https://files.pythonhosted.org/packages/6c/42/661302544fea4310d59b29f7dd947677a4cc61f3fdc4db88f65afa55b0e0/oasa_api-0.1.1.tar.gz",
    "platform": null,
    "description": "# OASA API Wrapper\n\nThis Python package provides a convenient wrapper for interacting with the OASA S.A. (Athens Public Transport) API,\nallowing users to retrieve various information related to the public transport network in Athens, Greece.\n\nThe OASA S.A. API provides access to information such bus lines, schedules, routes, stops, arrivals, and bus locations.\nThe information obtained through this package corresponds to the data available on the [OASA S.A. website](https://www.oasa.gr/en/),\nproviding users  with a programmatic way to access the same data.\n\n## Installation\n\nYou can install the package via pip:\n\n```bash\npip install oasa-api\n```\n\n## Usage\n\nTo use the package, simply import the OASAApi class from the oasa_api module and create an instance of it. Then, you can\ncall various methods to retrieve information from the OASA API.\n\nHere's an example of how to retrieve information about lines with master line info:\n\n```python\nfrom oasa_api import OASAApi\n\n# Create an instance of OASAApi\noasa_api = OASAApi()\n\n# Retrieve information about lines with master line info\nlines_with_master_line_info = oasa_api.get_lines_with_master_line_info()\n\nprint(lines_with_master_line_info)\n```\n\nFor more detailed usage examples, please refer to the [demo notebook](./demo.ipynb).\n\n## Available Methods\n\n- `get_master_lines()`\n- `get_master_line_name(ml_code: int)`\n- `get_lines_with_master_line_info()`\n- `get_lines_and_routes_for_master_line_and_line_code(ml_code: int, line_code: int)`\n- `get_lines()`\n- `get_line_name(line_code: int)`\n- `get_schedule_days_master_line(line_code: int)`\n- `get_daily_schedule(line_code: int)`\n- `get_sched_lines(ml_code: int, sdc_code: int, line_code: int)`\n- `get_routes(line_code: int)`\n- `get_routes_for_line(line_code: int)`\n- `get_route_name(route_code: int)`\n- `get_routes_details_and_stops(route_code: int)`\n- `get_route_details(route_code: int)`\n- `get_stops(route_code: int)`\n- `get_routes_for_stops(stop_code: int)`\n- `get_stop_name_and_xy(stop_code: int)`\n- `get_closest_stops(lng: float, lat: float)`\n- `get_stop_arrivals(stop_code: int)`\n- `get_bus_location(route_code: int)`\n\nFor detailed information about each method, refer to the documentation in the source code.\n\n## Contributing\n\nContributions are welcome! If you encounter any issues or have suggestions for improvements, please open an issue or\nsubmit a pull request.\n\n## Acknowledgements\n\nSpecial thanks to Pretzel for writing a\n[helpful tutorial](https://www.pretzellogix.net/2021/12/08/how-to-write-a-python3-sdk-library-module-for-a-json-rest-api/)\non creating Python SDK libraries for REST APIs, and to [ChatGPT](https://chat.openai.com/)\nfor assisting with the documentation.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Romain Derollepot  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "This Python package provides a convenient wrapper to interact with the OASA S.A. (Athens Public Transport) API, allowing users to retrieve various information related to the public transport network in Athens, Greece.",
    "version": "0.1.1",
    "project_urls": {
        "Repository": "https://github.com/rderollepot/oasa_api.git"
    },
    "split_keywords": [
        "api",
        " data",
        " public transport",
        " athens",
        " timetables"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1eecaa8ce9e54601887798099fdb489242a2cde516c28c7960f18e2d58be322c",
                "md5": "0ce330c0c4f71707221912e6319d8d23",
                "sha256": "c3771faebb70e6a872678a6a4e4df31b14710018e019a52df3c6449dd4bfbdea"
            },
            "downloads": -1,
            "filename": "oasa_api-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0ce330c0c4f71707221912e6319d8d23",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 8096,
            "upload_time": "2024-06-24T14:59:42",
            "upload_time_iso_8601": "2024-06-24T14:59:42.369600Z",
            "url": "https://files.pythonhosted.org/packages/1e/ec/aa8ce9e54601887798099fdb489242a2cde516c28c7960f18e2d58be322c/oasa_api-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6c42661302544fea4310d59b29f7dd947677a4cc61f3fdc4db88f65afa55b0e0",
                "md5": "d26e0be8e22f182a48b8778c2d0ba5f5",
                "sha256": "79d8bf9cf21563cc7fee15847edaac6aed58a02708e07d4e746a3465c4f1d20b"
            },
            "downloads": -1,
            "filename": "oasa_api-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "d26e0be8e22f182a48b8778c2d0ba5f5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 8786,
            "upload_time": "2024-06-24T14:59:43",
            "upload_time_iso_8601": "2024-06-24T14:59:43.856781Z",
            "url": "https://files.pythonhosted.org/packages/6c/42/661302544fea4310d59b29f7dd947677a4cc61f3fdc4db88f65afa55b0e0/oasa_api-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-24 14:59:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "rderollepot",
    "github_project": "oasa_api",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "oasa-api"
}
        
Elapsed time: 0.94048s