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.1.1.tar.gz
(20.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
srtrain-2.1.1-py3-none-any.whl
(17.0 kB
view details)
File details
Details for the file srtrain-2.1.1.tar.gz.
File metadata
- Download URL: srtrain-2.1.1.tar.gz
- Upload date:
- Size: 20.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d04726acfef3b2d0ddcdb885466c7096c535a7d696a42a8992d782b851b36df
|
|
| MD5 |
e65784620ea4ee921cc27c22e2a48cb7
|
|
| BLAKE2b-256 |
2cdcc935b08ab0564ee7d06ad8642f950e4cea2007f2b4a8afb2988c5cd46d46
|
File details
Details for the file srtrain-2.1.1-py3-none-any.whl.
File metadata
- Download URL: srtrain-2.1.1-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79755c1f32b58dc8e422495f7c4b2a8c2ab51a1754d13e990c0e61202e84f301
|
|
| MD5 |
a124640f8824055b6042e8c04171a357
|
|
| BLAKE2b-256 |
e549ba01b52a460305c853b2fda44a3a67a5585f95099909e2f705f617b57fb4
|