Skip to main content

Warsaw data python api

Project description

Pythonic way to use Warsaw data API

This package allow to fetch data from API provided by "UM Warszawa" - https://api.um.warszawa.pl/

Getting Started

Installation

pip install warsaw-data-api

Using ZTM module

We can fetch all location data for buses:

import warsaw_data_api

ztm = warsaw_data_api.client('ztm', apikey='your_api_key')
buses = ztm.get_buses_location()

for bus in buses:
    print(bus)

We can do the same for trams, as a parameter we can set number of tram line

import warsaw_data_api

ztm = warsaw_data_api.client('ztm', apikey='your_api_key')
trams = ztm.get_trams_location(line=17)

for tram in trams:
    print(tram)

Passing API Key

We can pass API Key in two different ways:

  1. Pass API Key to client function as a parameter ztm = warsaw_data_api.client('ztm', apikey='your_api_key')
  2. Create environment variable called WARSAW_DATA_API_KEY

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

warsaw-data-api-0.1.4.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

warsaw_data_api-0.1.4-py2.py3-none-any.whl (4.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file warsaw-data-api-0.1.4.tar.gz.

File metadata

  • Download URL: warsaw-data-api-0.1.4.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.9.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for warsaw-data-api-0.1.4.tar.gz
Algorithm Hash digest
SHA256 a07a54a22bda88a157239c08c4f8d057d67e1d98e15518a0d2686a75a05d1877
MD5 30685608ead89a2eaa83f4b50c9028ed
BLAKE2b-256 f27b3d176bca448d15d35dc5a2f44ccbd3d7b009cf6104213cd01e024cbfd1f5

See more details on using hashes here.

File details

Details for the file warsaw_data_api-0.1.4-py2.py3-none-any.whl.

File metadata

  • Download URL: warsaw_data_api-0.1.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.9.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for warsaw_data_api-0.1.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 21939127e82c95b873fb93541959034c41e789214873c3bb71b129f4e661d343
MD5 b05d8c3144a6177a600a80b70db0658f
BLAKE2b-256 f62dbc820fca0913b6f437a2776eba2a5b4643531b1d8fd5bf23817364d5fe57

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page