UZ API wrapper
Project description
Unofficial UZ API SDK
This project is a light-weight wrapper around some API endpoints from UZ booking system. It uses the same interface as the frontend of the booking system, so you can use a session from browser's cookies and work on behalf of your account.
Quick start
Installation:
pip install UZ-SDK
Usage
from datetime import time, datetime, timedelta
from uz_sdk import TicketFinder, BookingSession
# search tickets from Ternopil to Kyiv for 4 days ahead
tf = TicketFinder(
2218300, # from id
2200001, # to id
datetime.now() + timedelta(3),
time(hour=0, minute=0),
bs=BookingSession("92o8bh2ok5i51svcmecou51794")
)
# add a filter from preset, skip this to search every type of places
tf.basic_filters(allowed_types=('П', 'К', 'С1'))
# get available trains
data = tf.find()
print(data)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
UZ SDK-0.0.3.tar.gz
(3.0 kB
view details)
Built Distribution
File details
Details for the file UZ SDK-0.0.3.tar.gz
.
File metadata
- Download URL: UZ SDK-0.0.3.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8246e0ad043e9fdcedf3773d1954d9f8f1b02fec5ab94de6949aa16443e78d25 |
|
MD5 | 0b066255662b758a01aca997a15933cd |
|
BLAKE2b-256 | d9af3ded4cfc4c01459eb8f990d6bceff0a1c1e7747fe690128858ad89e97ecf |
File details
Details for the file UZ_SDK-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: UZ_SDK-0.0.3-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46819586ea2607577f06128ed2743d981eaa39d22c5e378551a406aa38487e4f |
|
MD5 | e8b7750b3ea3023e04abdb6cd4e89bac |
|
BLAKE2b-256 | af09c884f9f8b3ca5c83d557987b39e9ac16537003ee9d4d252848d5bcc05b14 |