transportapi-python 🚆🚌🚲
Unofficial Python 3.7 API wrapper for the TransportAPI.
Dependencies
[dev-packages]
black = "*"
[packages]
requests = "*"
[requires]
python_version = "3.7"
Install transportapi-python using either:
pip3 install transportapi-python,pipenv install,pip3 install -r requirements.txt,python setup.py install.
Example Usage
- Obtain an API Key.
See transportapi_python/transportapi.py for other parameters.
- Accessing the Train endpoints.
from transportapi_python import Train
from pprint import pprint
# HTTP(S) proxies are supported: https://2.python-requests.org/en/master/user/advanced/#proxies
train = Train(APP_ID="Your app ID here.", API_KEY="Your API key here.")
# Uses the default value station_code: "LBG".
pprint(train.train_timetable())
- Accessing Bus endpoints.
from transportapi_python import Bus
from pprint import pprint
# HTTP(S) proxies are supported: https://2.python-requests.org/en/master/user/advanced/#proxies
bus = Bus(APP_ID="Your app ID here.", API_KEY="Your API key here.")
# Uses the default value station_code: "LBG".
pprint(bus.bus_service_info())
Usage for Public, Car and Bicycle classes are exactly the same as above.
Additional Information
Changelog
- 0.0.1 - Inital release of transportapi-python. Covered all endpoints of the API.
Authors -- Contributors
- Dextroz - Author - Dextroz
License
This project is licensed under the MIT License - see the LICENSE for details.
Disclaimer
This API wrapper is unofficial meaning it has no affiliation with TransportAPI. When using their API, you consent to their terms & conditions and privacy policy.
Metadata
Release files for transportapi-python 0.0.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 | |
|---|---|---|---|
| transportapi-python-0.0.1.tar.gz | 5.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| transportapi_python-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.4 kB
Release files / transportapi-python-0.0.1.tar.gz
| Download URL | transportapi-python-0.0.1.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3445bc4b53ddb9c9983b1cf6cb0af63e06780bb595f4e53befab909a131405c1
|
|
BLAKE2b-256 checksum How to use checksums |
fb849b163de428ec4974a3f71fe8c881e411186ff99a2c4d61c89b955e359783
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3
|
Release files / transportapi_python-0.0.1-py3-none-any.whl
| Download URL | transportapi_python-0.0.1-py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4043a366ed955ddec94d0bfaa79935798b92f76f1bad8d945bafb74798178edd
|
|
BLAKE2b-256 checksum How to use checksums |
2c245287a0442bfad00800e01e152bbb4744aeeb4ac31f7522e81a445ad03af4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3
|