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.0.6.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

SRTrain-2.0.6-py2.py3-none-any.whl (16.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file SRTrain-2.0.6.tar.gz.

File metadata

  • Download URL: SRTrain-2.0.6.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.2

File hashes

Hashes for SRTrain-2.0.6.tar.gz
Algorithm Hash digest
SHA256 e3574aae3697830c9e2640b039c74408d6a3c69eacb4e6e67129715cdd1177d0
MD5 419fe6fb7fa4e7ac675be195093665c5
BLAKE2b-256 e6dc9d5f95dafc33a290be1dbc48109991b0adbf8d18d6160a5f6cde9f2d62e3

See more details on using hashes here.

File details

Details for the file SRTrain-2.0.6-py2.py3-none-any.whl.

File metadata

  • Download URL: SRTrain-2.0.6-py2.py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.2

File hashes

Hashes for SRTrain-2.0.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f9823dc03b5d6bcc6b89d2bd7420d3adb5fdaabd6de16d7ca65211addb323bc4
MD5 41aa7f1e075b4ae8b3f90deaa9f81a1a
BLAKE2b-256 cec0d62d2c0e10332ac4b21a6c61d08740aa4d1be8d31a9515cfe9b87250ed4d

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