pydantic-tfl-api


Namepydantic-tfl-api JSON
Version 1.2.2 PyPI version JSON
download
home_pagehttps://github.com/mnbf9rca/pydantic_tfl_api
SummaryA Pydantic-based wrapper for the TfL Unified API https://api-portal.tfl.gov.uk/. Not associated with or endorsed by TfL.
upload_time2024-11-17 09:42:00
maintainerNone
docs_urlNone
authorRob Aleck
requires_python<4.0,>3.9
licenseMIT
keywords pydantic tfl tfl-api transport-for-london unified-api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pydantic tfl api

I originally used [TfL-python-api](https://github.com/dhilmathy/TfL-python-api) by @dhilmathy but that verision depends on the [msrest](https://github.com/Azure/msrest-for-python) package, which has been deprecated for 2+ years. I have created this package to replace it, using pydantic and requests.

This API returns data from the TfL API in a more pythonic way, using pydantic models. It's a thin wrapper around the TfL API, so you can use the TfL API documentation to see what data is available.

## Installation

```bash
pip install pydantic-tfl-api
```

or

```bash
poetry add pydantic-tfl-api
```

## Usage

Uses Pydantic so you can use the `model_dump_json()` method to fully expand all the objects in the result. See [Pydantic documentation](https://docs.pydantic.dev/latest/) for more help.

You can obtain an API key from [your profile page on the API portal](https://api-portal.tfl.gov.uk/profile) although you only need this if doing more than a dozen or so requests per minute.

```python
from pydantic_tfl_api import LineClient

token = None # only need a token if > 1 request per second

client = LineClient(token)
response_object = client.MetaModes()
# the response object is a pydantic model
# the `content`` attribute is the API response, parsed into a pydantic model
mode_array = response_object.content
# if it's an array, it's a wrapped in a `RootModel``, which means it has a root attribute containing the array
array_content = mode_array.root

print(array_content[0].modeName)

# obviously, you can chain these together
print (client.MetaModes().content.root[0].model_dump_json())
print (client.GetByModeByPathModes(modes="bus").content.root[0].model_dump_json())

# you can also use the models directly
print ([f'The {line_item.name} line is {line_item.modeName}' for line_item in client.StatusByModeByPathModesQueryDetailQuerySeverityLevel(modes="tube").content.root])

# some return enormous amounts of data with very complex models
print(client.RouteSequenceByPathIdPathDirectionQueryServiceTypesQueryExcludeCrowding(id="northern", direction="all").model_dump_json())
```
## Class structure



### Models

Pydantic models are used to represent the data returned by the TfL API, and are in the `models` module. There are circular references in the TfL API, so these are handled by using `ForwardRef` in the models. Overall, there are 117 Pydantic models in the package. Models are automatically generated from the TfL API OpenAPI documentation, so if the TfL API changes, the models will be updated to reflect this. Fields are 'santizied' to remove any reserved words in Python (`class` or `from` for example), but otherwise are identical to the TfL API. In some cases, the TfL response has no definition, so the model is a `Dict[str, Any]`.

Some of the TfL responses are arrays, and these are wrapped in a `RootModel` object, which contains the array in the `root` attribute - for example, a `LineArray` model contains an array of `Line` objects in the `root` attribute. See the [Pydantic documentation for more information on how to use RootModels](https://docs.pydantic.dev/latest/concepts/models/#rootmodel-and-custom-root-types).


Successful responses are wrapped in a `ResponseModel` object, which contains the cache expiry time (`content_expires` and `shared_expires`, which are the calculated expiry based on the HTTP response timestamp and the `maxage`/`s-maxage` header respectively) for use to calculate the time to live of the object, and to determine if the object is still valid - for example if implementing caching - and the response object (in the `content` attribute).
Failures return an `ApiError` object, which contains the HTTP status code and the error message.

### Clients

 There are dedicated clients for each of the TfL APIs. These all inherit from `core.Client`. The method names are the same as the path IDs in the TfL API documentation, unless they are reserved words in Python, in which case they are suffixed with `Query_` (there are currently none in the package).

Clients are automatically generated from the TfL API OpenAPI documentation, so if the TfL API changes, the clients will be updated to reflect this. Clients are available for all the TfL API endpoints, and are named after the endpoint, with the `Client` suffix. Methods are named after the path ID in the TfL API documentation, with the `Query_` prefix if the path ID is a reserved word in Python (there are none in the package as far as i know), and they take the same parameters as the TfL API documentation. Here are the current clients from the `endpoints` module:

```bash
endpoints
├── AccidentStatsClient.py
├── AirQualityClient.py
├── BikePointClient.py
├── CrowdingClient.py
├── JourneyClient.py
├── LiftDisruptionsClient.py
├── LineClient.py
├── ModeClient.py
├── OccupancyClient.py
├── PlaceClient.py
├── RoadClient.py
├── SearchClient.py
├── StopPointClient.py
├── VehicleClient.py
```

Here's a Mermaid visualisation of the Pydantic models (or [view online](https://merma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i30KWX9tUtnwy99bxc_6T5uEjrzCajH6yykb0HtCO-pV8S3IPduwOw52DQCY20tVSPGjMDhRshC0vRwkZy-6w3cF_r_jqgpeswW3PgBtFk9nJ3AuKZoNtILKR2znVYT-LiJeK1CpPwieseXt-goFtgui0GNSa02KUQ0Y0A4YMBvfG8Kw3L1s2Tw_KVFH2LejShkoheup_6R9be-6Gt0wBb8AOT5E8uXjid_tw4LB8SHSpHr7Aq0L2JvKev8ZjyHtKeYd17SrzyDEddoZ1fulbller206iz9-WlzdkO7A7oGpx3hMhrr39BqoB_4UoWIf6TI4_QjfKIfDbchGgCZx2uZCljlIYxu5puHHOKjds6CczbZZWBzAWv4p95pnbUBpmuM3bf2fh6DAeu32ch7mkExfTvNIMxvNXHdCvTExhF7R5_zcVtokuj76tn0KH2OiBwdse_9Z0sMys-sNz6MzWmmwINBAmd7RRlWWqfzj7cJlsemxsp8nSILF_2gwLtbdqfQk3dg06a0nA17w1xU3afWdZhgt6GdV_VuNXCnrbW431MiSlYJ2hsAPkq7NZsk2s3Db_S2VK_rEO7q5uW3zPk0rm1D_PaFLwb3z97bvLtU_N9kWXINyivE_Hi4e8lMH5LbxX7wuLGdQs2l685konVLWG8xHyC-stwwcnF9tB89bdRlaJ6Vxrf_AatX7DrubsBtaaxvupqfy3rU-wK7l-otsU1hX-lv7OEPmDLaZs-6cthraT5DtSXVUf7sKFt-MBkfB8aDaP_6GZAjvMPO1DlC--4VK9pXCQ4CnYod8DiYBq8lqLHQG2RJh5M6b8xPkGeqMfgkb-RFHIlwoJHwZQ-j_EoyNOYTL35fbIFU-DB9DX4N5gen12cn5xdjiaTyelkcjEej46CIpiejn87GX-eXJ5PTseXn8eT0fnbUfCfEJRhdDKaXJxPzieXp6PxOcWcHQVkYJttMH2CJKuz_11J68Hosq6E_N78Wlr-8_Y_OZA7FA)

# Development environment

The devcontainer is set up to use the `poetry` package manager. You can use the `poetry` commands to manage the environment. The `poetry.lock` file is checked in, so you can use `poetry install --with dev --no-interaction --sync --no-root` to install the dependencies (which the devcontainer does on the `postCreateCommand` command).

You can test the build by running `./build.sh "/workspaces/pydantic_tfl_api/pydantic_tfl_api" "/workspaces/pydantic_tfl_api/TfL_OpenAPI_specs" True` in the devcontainer. This will build the package and install it in the devcontainer. You can then run the tests with `pytest` in the `tests` directory.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mnbf9rca/pydantic_tfl_api",
    "name": "pydantic-tfl-api",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>3.9",
    "maintainer_email": null,
    "keywords": "pydantic, tfl, tfl-api, transport-for-london, unified-api",
    "author": "Rob Aleck",
    "author_email": "mnbf9rca@users.noreply.github.com",
    "download_url": "https://files.pythonhosted.org/packages/a4/ce/c09a6267e197e1f7c9774537b4d114f0fcf609e5f1f77aba76dd739f4753/pydantic_tfl_api-1.2.2.tar.gz",
    "platform": null,
    "description": "# pydantic tfl api\n\nI originally used [TfL-python-api](https://github.com/dhilmathy/TfL-python-api) by @dhilmathy but that verision depends on the [msrest](https://github.com/Azure/msrest-for-python) package, which has been deprecated for 2+ years. I have created this package to replace it, using pydantic and requests.\n\nThis API returns data from the TfL API in a more pythonic way, using pydantic models. It's a thin wrapper around the TfL API, so you can use the TfL API documentation to see what data is available.\n\n## Installation\n\n```bash\npip install pydantic-tfl-api\n```\n\nor\n\n```bash\npoetry add pydantic-tfl-api\n```\n\n## Usage\n\nUses Pydantic so you can use the `model_dump_json()` method to fully expand all the objects in the result. See [Pydantic documentation](https://docs.pydantic.dev/latest/) for more help.\n\nYou can obtain an API key from [your profile page on the API portal](https://api-portal.tfl.gov.uk/profile) although you only need this if doing more than a dozen or so requests per minute.\n\n```python\nfrom pydantic_tfl_api import LineClient\n\ntoken = None #\u00a0only need a token if > 1 request per second\n\nclient = LineClient(token)\nresponse_object = client.MetaModes()\n# the response object is a pydantic model\n# the `content`` attribute is the API response, parsed into a pydantic model\nmode_array = response_object.content\n# if it's an array, it's a wrapped in a `RootModel``, which means it has a root attribute containing the array\narray_content = mode_array.root\n\nprint(array_content[0].modeName)\n\n# obviously, you can chain these together\nprint (client.MetaModes().content.root[0].model_dump_json())\nprint (client.GetByModeByPathModes(modes=\"bus\").content.root[0].model_dump_json())\n\n# you can also use the models directly\nprint ([f'The {line_item.name} line is {line_item.modeName}' for line_item in client.StatusByModeByPathModesQueryDetailQuerySeverityLevel(modes=\"tube\").content.root])\n\n# some return enormous amounts of data with very complex models\nprint(client.RouteSequenceByPathIdPathDirectionQueryServiceTypesQueryExcludeCrowding(id=\"northern\", direction=\"all\").model_dump_json())\n```\n## Class structure\n\n\n\n### Models\n\nPydantic models are used to represent the data returned by the TfL API, and are in the `models` module. There are circular references in the TfL API, so these are handled by using `ForwardRef` in the models. Overall, there are 117 Pydantic models in the package. Models are automatically generated from the TfL API OpenAPI documentation, so if the TfL API changes, the models will be updated to reflect this. Fields are 'santizied' to remove any reserved words in Python (`class` or `from` for example), but otherwise are identical to the TfL API. In some cases, the TfL response has no definition, so the model is a `Dict[str, Any]`.\n\nSome of the TfL responses are arrays, and these are wrapped in a `RootModel` object, which contains the array in the `root` attribute - for example, a `LineArray` model contains an array of `Line` objects in the `root` attribute. See the [Pydantic documentation for more information on how to use RootModels](https://docs.pydantic.dev/latest/concepts/models/#rootmodel-and-custom-root-types).\n\n\nSuccessful responses are wrapped in a `ResponseModel` object, which contains the cache expiry time (`content_expires` and `shared_expires`, which are the calculated expiry based on the HTTP response timestamp and the `maxage`/`s-maxage` header respectively) for use to calculate the time to live of the object, and to determine if the object is still valid - for example if implementing caching - and the response object (in the `content` attribute).\nFailures return an `ApiError` object, which contains the HTTP status code and the error message.\n\n### Clients\n\n There are dedicated clients for each of the TfL APIs. These all inherit from `core.Client`. The method names are the same as the path IDs in the TfL API documentation, unless they are reserved words in Python, in which case they are suffixed with `Query_` (there are currently none in the package).\n\nClients are automatically generated from the TfL API OpenAPI documentation, so if the TfL API changes, the clients will be updated to reflect this. Clients are available for all the TfL API endpoints, and are named after the endpoint, with the `Client` suffix. Methods are named after the path ID in the TfL API documentation, with the `Query_` prefix if the path ID is a reserved word in Python (there are none in the package as far as i know), and they take the same parameters as the TfL API documentation. Here are the current clients from the `endpoints` module:\n\n```bash\nendpoints\n\u251c\u2500\u2500 AccidentStatsClient.py\n\u251c\u2500\u2500 AirQualityClient.py\n\u251c\u2500\u2500 BikePointClient.py\n\u251c\u2500\u2500 CrowdingClient.py\n\u251c\u2500\u2500 JourneyClient.py\n\u251c\u2500\u2500 LiftDisruptionsClient.py\n\u251c\u2500\u2500 LineClient.py\n\u251c\u2500\u2500 ModeClient.py\n\u251c\u2500\u2500 OccupancyClient.py\n\u251c\u2500\u2500 PlaceClient.py\n\u251c\u2500\u2500 RoadClient.py\n\u251c\u2500\u2500 SearchClient.py\n\u251c\u2500\u2500 StopPointClient.py\n\u251c\u2500\u2500 VehicleClient.py\n```\n\nHere's a Mermaid visualisation of the Pydantic models (or [view online](https://mermaid-js.github.io/mermaid-live-editor/edit#pako:eNqVWNtu2zgQ_ZVCz0mwce1c_LBA1m5Sd9O1EQUpsMjLWJrYbGRSS1HOaoP8-47uvMlJCxStzjkzJIfDI8qvQSRiDKZBlECWzRlsJOwe-Sf6cxVFLEau5qiAJVdSQvHp-Ph3C_dpK9kMshwSVQwKHnDLogRbXrE9hij3LML7IsVMH9Di6pBqxkMkRbM9JHNMQapcopbNYvz6SrqSGDPKL_g92zG-qaV_sGdcCcbVMoryFHhU9MldTp_rEDsDuQL53KF1KjBjzUezurMtyA3OBOcYKSE9ExtSGDkPauYsk3mqMK5W0Gc2cT2fj2kwKqmTgTA9-gY5ShbdYZYKnuF3atOm2RaKEQWyIC5PVJXjm8glx-JdwSoBWp6cFdR5X5nEuYieaWdDBeX4c1DwboqHqjrDsluChtkQQUbbmWSKVtcM1iTWB7mGtjN18hY3BliqKsKRG8wM9gjNBhjEPaR6yX1akujy-vxmdpSf-cWaG0F6lWnZ3kZp8UXpLOyJoaVf8EzJPHIDlutMQec9LboCtbWQaubxDyGf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2VK_rEO7q5uW3zPk0rm1D_PaFLwb3z97bvLtU_N9kWXINyivE_Hi4e8lMH5LbxX7wuLGdQs2l685konVLWG8xHyC-stwwcnF9tB89bdRlaJ6Vxrf_AatX7DrubsBtaaxvupqfy3rU-wK7l-otsU1hX-lv7OEPmDLaZs-6cthraT5DtSXVUf7sKFt-MBkfB8aDaP_6GZAjvMPO1DlC--4VK9pXCQ4CnYod8DiYBq8lqLHQG2RJh5M6b8xPkGeqMfgkb-RFHIlwoJHwZQ-j_EoyNOYTL35fbIFU-DB9DX4N5gen12cn5xdjiaTyelkcjEej46CIpiejn87GX-eXJ5PTseXn8eT0fnbUfCfEJRhdDKaXJxPzieXp6PxOcWcHQVkYJttMH2CJKuz_11J68Hosq6E_N78Wlr-8_Y_OZA7FA)\n\n# Development environment\n\nThe devcontainer is set up to use the `poetry` package manager. You can use the `poetry` commands to manage the environment. The `poetry.lock` file is checked in, so you can use `poetry install --with dev --no-interaction --sync --no-root` to install the dependencies (which the devcontainer does on the `postCreateCommand` command).\n\nYou can test the build by running `./build.sh \"/workspaces/pydantic_tfl_api/pydantic_tfl_api\" \"/workspaces/pydantic_tfl_api/TfL_OpenAPI_specs\" True` in the devcontainer. This will build the package and install it in the devcontainer. You can then run the tests with `pytest` in the `tests` directory.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Pydantic-based wrapper for the TfL Unified API https://api-portal.tfl.gov.uk/. Not associated with or endorsed by TfL.",
    "version": "1.2.2",
    "project_urls": {
        "Homepage": "https://github.com/mnbf9rca/pydantic_tfl_api",
        "Repository": "https://github.com/mnbf9rca/pydantic_tfl_api"
    },
    "split_keywords": [
        "pydantic",
        " tfl",
        " tfl-api",
        " transport-for-london",
        " unified-api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0dc9c2d377d30ca9f9edfa69ba1bedb025e14d4395ee9a3744211105d8faec40",
                "md5": "ff2bc8e26e47b97b5f689a82cbe8282b",
                "sha256": "b83f25a3b2b051d119d602b8c082cd6aec2efd080d96451f5a94afce898e2abc"
            },
            "downloads": -1,
            "filename": "pydantic_tfl_api-1.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ff2bc8e26e47b97b5f689a82cbe8282b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>3.9",
            "size": 94685,
            "upload_time": "2024-11-17T09:41:58",
            "upload_time_iso_8601": "2024-11-17T09:41:58.632966Z",
            "url": "https://files.pythonhosted.org/packages/0d/c9/c2d377d30ca9f9edfa69ba1bedb025e14d4395ee9a3744211105d8faec40/pydantic_tfl_api-1.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a4cec09a6267e197e1f7c9774537b4d114f0fcf609e5f1f77aba76dd739f4753",
                "md5": "a918bd47282ad770321a9a3b668bc530",
                "sha256": "29977ae8975b269a7b9a825a5501cbaec29ff7e1dfbac167680601cb67a9cd86"
            },
            "downloads": -1,
            "filename": "pydantic_tfl_api-1.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "a918bd47282ad770321a9a3b668bc530",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>3.9",
            "size": 44179,
            "upload_time": "2024-11-17T09:42:00",
            "upload_time_iso_8601": "2024-11-17T09:42:00.365509Z",
            "url": "https://files.pythonhosted.org/packages/a4/ce/c09a6267e197e1f7c9774537b4d114f0fcf609e5f1f77aba76dd739f4753/pydantic_tfl_api-1.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-17 09:42:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mnbf9rca",
    "github_project": "pydantic_tfl_api",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pydantic-tfl-api"
}
        
Elapsed time: 0.99342s