Skip to main content

VGN

License Version PyPI download month Python versions Documentation Status Build Status

Asynchron Python API for the Verkehrsverbund Grossraum Nuernberg (VGN).

Uses the official REST-API to query realtime public transport information for Nuremberg.

With the python 3.7 feature asyncio tasks fast and non-blocking querries are possible.

Read the docs for more information.

Consider installing cchardet and aiodns via pip for speedup (see the aiohttp documentation).

Example

import vgn
import asyncio


async def main():
    async with VGNClient() as vgn_client:
        res = await asyncio.gather(
            vgn_client.api_version(),
            vgn_client.all_stations(),
            vgn_client.departure_schedule(704),
            vgn_client.departure_schedule_for_line(704, "U2"),
            vgn_client.rides(TransportType.BUS, 30),
        )

    print(f'Api version: {res[0]}')
    print(f'Stations in nbg: {str(len(res[1]))}')
    print(f'Departures at plaerrer in nbg: {res[2]}')
    print(f'Departures of underground line 2 at plaerrer in nbg: {res[3]}')
    print(f'Bus departures in the next 30 minutes: {res[4]}')

if __name__ == '__main__':
    asyncio.run(main())

Metadata

Release files for vgn 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vgn 2.0.0
File Size Uploaded Provenance
vgn-2.0.0.tar.gz 6.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for vgn 2.0.0
File Interpreter ABI Platform
vgn-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.4 kB

Release files / vgn-2.0.0.tar.gz

Download URL vgn-2.0.0.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
18d515cf936a4ddb0fb8b7bc7797fd6c873262480007254e5c91754d58d79465
BLAKE2b-256 checksum
How to use checksums
94fe6d8ab0efc363b2e2846f3cfc868c55f63c6d6f6d51df28dd91cecb8312da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

Release files / vgn-2.0.0-py3-none-any.whl

Download URL vgn-2.0.0-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8eddbe76f1933051a3414ed4ff15a77723ca1831bcfd9a0848fa3b77d714aae8
BLAKE2b-256 checksum
How to use checksums
4e5f7e64bad36070b292a949ec9ca2a691c593276d0a52eccd3557b1894be842
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

Security for vgn 2.0.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page