Skip to main content

Lib for getting schedule data from Yandex.Rasp API

Project description

yaschedule

Lib for getting schedule data from Yandex.Rasp API: https://yandex.ru/dev/rasp/doc/concepts/about.html

Python version PyPi version

Quick Start

from yaschedule.core import YaSchedule

# TO GET TOKEN - https://yandex.ru/dev/rasp/doc/concepts/access.html
TOKEN = 'some string' 

# init 
yaschedule = YaSchedule(TOKEN)

# get all stations in json 
yaschedule.get_all_stations() # !!! The size of the returned data is about 40 MB

# cities and stations codes from yaschedule.get_all_stations()
city_1 = 'c213' # Moscow
city_2 = 'c2' # Saint-Petersburg
station_1 = 's9600366' # Pulkovo
station_2 = 's9600213' # Sheremetevo

# get schedule between two stations
yaschedule.get_schedule(from_station=station_1, to_station=station_2)

# get schedule between two cities
yaschedule.get_schedule(from_station=city_1, to_station=city_2)

# get schedule between city and station
yaschedule.get_schedule(from_station=city_1, to_station=station_1)

# u can also specify other request params of request
# transport_type by default get all transport types
yaschedule.get_schedule(from_station=city_1, to_station=city_2, transport_types='train')
yaschedule.get_schedule(from_station=city_1, to_station=city_2, transport_types='plane')
# transfers by default: False
yaschedule.get_schedule(from_station=city_1, to_station=city_2, transfers=True)

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

yaschedule-0.0.4.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

yaschedule-0.0.4.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file yaschedule-0.0.4.0.tar.gz.

File metadata

  • Download URL: yaschedule-0.0.4.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.1

File hashes

Hashes for yaschedule-0.0.4.0.tar.gz
Algorithm Hash digest
SHA256 f7a098086bacaac846fbb0441bf38155a6ebb751e804190d650d10901ba81fdd
MD5 a43fa9193559824039673ee2ad6dcf32
BLAKE2b-256 b46e246e7f14471185d7302494e7e03d6388d2b34618fbc297e06cd117db9014

See more details on using hashes here.

File details

Details for the file yaschedule-0.0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for yaschedule-0.0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bcd2c9b04e62f764085eb149ede70ee752895e8d23f54c63cb6f6caadc991260
MD5 bac8dd5878bce3affb463ac73f54bd02
BLAKE2b-256 98eb41ee1b7732fa3f9ba772a12cc2fb8c21d9b9b38ff1c31941a490fcdce567

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