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.4.1.tar.gz
(26.5 kB
view details)
Built Distribution
srtrain-2.4.1-py3-none-any.whl
(16.0 kB
view details)
File details
Details for the file srtrain-2.4.1.tar.gz
.
File metadata
- Download URL: srtrain-2.4.1.tar.gz
- Upload date:
- Size: 26.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45a4f1cc7d5f3ee2187e2544dfec0a0d5e97e01a4c3954af403d54769eee7cf9 |
|
MD5 | 45e5d3ceadaebae22b131e1b91d43bf7 |
|
BLAKE2b-256 | 44572eca0f48332637717ee5f1f8c0ff356a963e8ed44230f1e9fef723a05af6 |
File details
Details for the file srtrain-2.4.1-py3-none-any.whl
.
File metadata
- Download URL: srtrain-2.4.1-py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6cc90b3386da28c519cec6a32b9896c029e70c2e6d7e08d13d6f341d6e54a3ea |
|
MD5 | 73c4bb62c42a2ddf76cfe9c24edbbfda |
|
BLAKE2b-256 | 17d17cd6ea112d061e63966d83d26330e112a9196477b30697a1ee5eb35ab2c8 |