Skip to main content

Koleo CLI

Project description

Koleo CLI

PyPI - Version PyPI - Python Version

Installation

install via pip by running pip install koleo-cli

gif showcasing the functionality

it currently allows you to:

  • get departures/arrival list for a station
  • get train info given its number and name(pull requests are welcome if you know how to get a train object by just the number)
  • find a station or list all known stations
  • find a connection from station a to b, with filtering by operators
  • save a station as your favourite to quickly check it's departures

additionally you can also use the KoleoAPI wrapper directly in your own projects, all returns are fully typed using typing.TypedDict

MY(possibly controversial) design choices:

  • platforms and track numbers are shown using arabic numerals instead of roman
    • you can change it by adding use_roman_numerals: true to your config.json file
  • most api queries are cached for 24h
    • you can change it by adding disable_cache: true to your config.json file
  • the cli.py code is really dirty but printing formatted data is hard :<

pull requests are welcome!!

usage: koleo [-h] [-c CONFIG] [--nocolor] {departures,d,dep,odjazdy,o,arrivals,a,arr,przyjazdy,p,trainroute,r,tr,t,poc,pociąg,stations,s,find,f,stacje,ls,connections,do,z,szukaj,path} ...

Koleo CLI

options:
  -h, --help            show this help message and exit
  -c CONFIG, --config CONFIG
                        Custom config path.
  --nocolor             Disable color output and formatting

actions:
  {departures,d,dep,odjazdy,o,arrivals,a,arr,przyjazdy,p,trainroute,r,tr,t,poc,pociąg,stations,s,find,f,stacje,ls,connections,do,z,szukaj,path}
    departures (d, dep, odjazdy, o)
                        Allows you to list station departures
    arrivals (a, arr, przyjazdy, p)
                        Allows you to list station departures
    trainroute (r, tr, t, poc, pociąg)
                        Allows you to show the train's route
    stations (s, find, f, stacje, ls)
                        Allows you to find stations by their name
    connections (do, z, szukaj, path)
                        Allows you to search for connections from a to b

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

koleo_cli-0.2.137.12.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

koleo_cli-0.2.137.12-py3-none-any.whl (25.6 kB view details)

Uploaded Python 3

File details

Details for the file koleo_cli-0.2.137.12.tar.gz.

File metadata

  • Download URL: koleo_cli-0.2.137.12.tar.gz
  • Upload date:
  • Size: 26.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for koleo_cli-0.2.137.12.tar.gz
Algorithm Hash digest
SHA256 a444585f47915ca6ea576cca1dfd0d63791e8282fdcc42a06d8bd725c02eaa36
MD5 b3b7acbf0e5c35299180ca9ef25134f9
BLAKE2b-256 69035895366c683773b5badfccc6cb8636ce4865cd9600a62f043780a9c90490

See more details on using hashes here.

File details

Details for the file koleo_cli-0.2.137.12-py3-none-any.whl.

File metadata

File hashes

Hashes for koleo_cli-0.2.137.12-py3-none-any.whl
Algorithm Hash digest
SHA256 1fb0a75e3fb37c63b989f5a6e3f8c9fb16d760bc56363f9632f4bb64d2b98f53
MD5 a95eb5588b01faec9e2a6be0ea2c3be6
BLAKE2b-256 8c3def11a3209e8bbad538106757dcb9ed020b50a7e911812c10720cbb9bc888

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