SRT(Super Rapid Train) wrapper for python
Project description
SRT
SRT(Super Rapid Train) application python wrapper
With SRTrain
, you can:
- Search SRT train schedules.
- Reserve SRT trains.
- Find your reservations/tickets information.
- Cancel reservations/tickets.
while you can't:
- Pay for a ticket.
- Search or reserve non-SRT trains (KTX, ITX, ... ) (use korail2 instead)
This project was inspired from korail2 of carpedm20.
Quickstart
pip install SRTrain
>>> from SRT import SRT
>>> srt = SRT("010-1234-xxxx", YOUR_PASSWORD)
>>> dep = '수서'
>>> arr = '부산'
>>> date = '20190930'
>>> time = '144000'
>>> trains = srt.search_train(dep, arr, date, time)
>>> trains
# [[SRT] 09월 30일, 수서~부산(15:00~17:34) 특실 예약가능, 일반실 예약가능,
# [SRT] 09월 30일, 수서~부산(15:30~18:06) 특실 예약가능, 일반실 예약가능,
# [SRT] 09월 30일, 수서~부산(16:00~18:24) 특실 매진, 일반실 예약가능,
# [SRT] 09월 30일, 수서~부산(16:25~18:45) 특실 예약가능, 일반실 예약가능, ...]
>>> reservation = srt.reserve(trains[1])
>>> reservation
# [SRT] 09월 30일, 수서~부산(15:30~18:06) 53700원(1석), 구입기한 09월 20일 23:38
Documentation
See documentation.
See Also
- go-SRT: SRT golang wrapper
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
SRTrain-2.0.2.tar.gz
(12.6 kB
view details)
Built Distribution
File details
Details for the file SRTrain-2.0.2.tar.gz
.
File metadata
- Download URL: SRTrain-2.0.2.tar.gz
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a338bb45f37b9eee5306cd8f691fe793229db2da6c0710f79a4e5c0080a724f |
|
MD5 | d5662cc52b64f3c59f0036e9c4d1e51d |
|
BLAKE2b-256 | 1f25b9275476e6ede597961e8d153d1680da9f9063e18734cd44380fa3ea6376 |
File details
Details for the file SRTrain-2.0.2-py2.py3-none-any.whl
.
File metadata
- Download URL: SRTrain-2.0.2-py2.py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64c70bd8b2fe93e22d7263f0afc7b7b249a44bdee59751cda15e1b9f7ffe426d |
|
MD5 | c83eb3d67c16072cca320edf2687a9d5 |
|
BLAKE2b-256 | 79418f9e2ceb5fa486237e31de9f2181cc6010dd0b0b076564fb7fa670e8c5ca |