Skip to main content

SRT(Super Rapid Train) wrapper for python

Project description

SRT

github actions badge Downloads Downloads Documentation Status

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

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

srtrain-2.3.0.tar.gz (27.6 kB view details)

Uploaded Source

Built Distribution

srtrain-2.3.0-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file srtrain-2.3.0.tar.gz.

File metadata

  • Download URL: srtrain-2.3.0.tar.gz
  • Upload date:
  • Size: 27.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for srtrain-2.3.0.tar.gz
Algorithm Hash digest
SHA256 0fa2bbf4728355a2448345e80968bafd0d9488bb9f35a9c73bc74842b32f073b
MD5 a3922995437a4b8672ed4e9aef9902bd
BLAKE2b-256 4889b77c583ab6bd6c99e57a3e43ed992eac6975762a8d94784926f644bc9b92

See more details on using hashes here.

File details

Details for the file srtrain-2.3.0-py3-none-any.whl.

File metadata

  • Download URL: srtrain-2.3.0-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for srtrain-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1a98df8ee067a1d782d810d50fcd5f15a33b48c5e38fb06302ff4fd963f49afd
MD5 42d0b5f374f6c2305105dfba7fe84ad1
BLAKE2b-256 9e098ad3adc8d720604f3778074d00837e3d2779e70e65d93f68d54a2559db06

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