Skip to main content

A small helper library for Irish Rail ticket fares and routes

Project description

rail-lib

A small helper library used for the Irish Rail project.

Features

  • Calculate ticket fares
  • Validate train routes

Functions

calculate_fare(is_student=False, seat_class="normal")

Returns the ticket fare based on rules:

  • Base fare €15
  • Business class +15%
  • Student discount -10%

is_valid_route(from_station, to_station)

Checks if a route is valid (not the same station).

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

rail_lib-0.1.0.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rail_lib-0.1.0-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

Details for the file rail_lib-0.1.0.tar.gz.

File metadata

  • Download URL: rail_lib-0.1.0.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.20

File hashes

Hashes for rail_lib-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d05687e4a0b85a34980d46a42612ce09840d1e6399093e5e58897369cf197b8d
MD5 94dee6aee6b202d6e891a484a0b7e749
BLAKE2b-256 dd46cd3c0e4a8691ef5cce9bc3644368880d397eb7eeb49255a3f9f06fa40017

See more details on using hashes here.

File details

Details for the file rail_lib-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: rail_lib-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.20

File hashes

Hashes for rail_lib-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b2fd128577b8c983d6c2dda74e1dfb6250c7c3a21fcbb733cf9fd1e24e58e45b
MD5 c3ef64302b55b552e08fbae4baa2767e
BLAKE2b-256 a96e4c569ea41c821a5dcc3f5f1f6ce1f6f3f275a46bbce8a05d58a5d03ddd25

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page