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

Uploaded Source

Built Distribution

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

koleo_cli-0.2.137.14-py3-none-any.whl (25.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: koleo_cli-0.2.137.14.tar.gz
  • Upload date:
  • Size: 26.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for koleo_cli-0.2.137.14.tar.gz
Algorithm Hash digest
SHA256 8f824e6ec55699025dcb7763a85abff64fff04c0c989af1c5c4dd8ce6ca2544b
MD5 e8560c1e44d2589fc4caddccafef4ec3
BLAKE2b-256 89c7c4ddb60310a27f9109b7ea774e1de6012ef48542ad317338bd5826b41ec2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: koleo_cli-0.2.137.14-py3-none-any.whl
  • Upload date:
  • Size: 25.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for koleo_cli-0.2.137.14-py3-none-any.whl
Algorithm Hash digest
SHA256 e99e32fb9050229b9f17e562e68099b980c92ff940cadd919d14d82b4eafb390
MD5 eab67d7101cacfaba82455b0eca51857
BLAKE2b-256 94381ace4f26dda24f21aa1b9df67bc41e31b4a10c12a6737aa2f547ebc6b4bf

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