pynaptan
A fully typed python library for retrieving UK NaPTAN stops data.
Getting started
Pynaptan provides a client for querying the NaPTAN data and returning the each
stop as a Stop object.
To retrieve stops from NaPTAN,
from pynaptan import Naptan
client = Naptan()
istops = client.iget_all_stops()
# istops is a generator
next(istops)
Stop(atco_code='0100BRP90310', naptan_code='bstgwpa', plate_code='',
cleardown_code='', common_name='Temple Meads Stn', common_name_lang='',
short_common_name='Temple Meads Stn', short_common_name_lang='', landmark='',
landmark_lang='', street='Redcliffe Way', street_lang='', crossing='',
crossing_lang='', indicator='T3', indicator_lang='', bearing='SE',
nptg_locality_code='N0077020', nptg_locality_name='Temple Meads',
parent_locality_name='', grand_parent_locality_name='', town='', town_lang='',
suburb='', suburb_lang='', locality_centre=False, grid_type='UKOS', easting=359396,
northing=172388, longitude=-2.58569, latitude=51.44901, stop_type='BCT',
bus_stop_type='MKD', timing_status='OTH', default_wait_time='', notes='', notes_lang='',
administrative_area_code='009', creation_date_time=datetime.datetime(2009, 8, 25, 0, 0),
modification_date_time=datetime.datetime(2019, 9, 13, 10, 41, 24), revision_number=92,
modification='new', status='active')
To retrieve all stops as a list of Stop objects use the .get_all_stops method,
>> from pynaptan import Naptan
>> client = Naptan()
>> stops = client.get_all_stops()
>> len(stops)
436167
Metadata
Release files for pynaptan 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pynaptan-0.2.0.tar.gz | 5.5 kB | Without provenance | Details for pynaptan-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pynaptan-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for pynaptan-0.2.0-py3-none-any.whl |
Total release size: 12.0 kB
Release files / pynaptan-0.2.0.tar.gz
| Download URL | pynaptan-0.2.0.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5b07dc470ecba155742a73cf4a2d38078011cce6ef9a2916bec7bc023fecde91
|
|
BLAKE2b-256 checksum How to use checksums |
7ea9ad5412840089442381567cb7a1c96daedc058e30d1f87b2b04393176a993
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.9.16 Linux/5.15.0-1031-azure
|
Release files / pynaptan-0.2.0-py3-none-any.whl
| Download URL | pynaptan-0.2.0-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cbe63d9d7ed64d548b07eff32e79b9a7ed37c1d4e3a8b0694c81f47739ce5b78
|
|
BLAKE2b-256 checksum How to use checksums |
b101047f787fcae09946527eb8cb14624192a07ae8d1d8803a51cd6fb59b18bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.9.16 Linux/5.15.0-1031-azure
|
Security for pynaptan 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.