Skip to main content

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

Metadata

Release files for koleo-cli 0.2.137.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for koleo-cli 0.2.137.11
File Size Uploaded
koleo_cli-0.2.137.11.tar.gz 26.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for koleo-cli 0.2.137.11
File Interpreter ABI Platform
koleo_cli-0.2.137.11-py3-none-any.whl Python 3 none any Details

Total release size: 51.5 kB

Release files / koleo_cli-0.2.137.11.tar.gz

Download URL koleo_cli-0.2.137.11.tar.gz
Size 26.0 kB
Tags Source
SHA-256 checksum
How to use checksums
92640681fcf9b1aedce2cca5c13d753bc69495ccfc055eba4e1da3fa88c8ed86
BLAKE2b-256 checksum
How to use checksums
5f3f6f6c41c6cf05864853eb42e61094ec1ec257a8bea94d864817994ff448d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.20

Release files / koleo_cli-0.2.137.11-py3-none-any.whl

Download URL koleo_cli-0.2.137.11-py3-none-any.whl
Size 25.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7bdb28e89f50a101b757d49625ce88d055ac10949afd1ed2800906b334d1bf35
BLAKE2b-256 checksum
How to use checksums
f287f2e3c5ed3a08517f4db65684611e160ed5df4d8f57ae25a402876ab79f5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.20

Release history Release notifications | RSS feed

This release

0.2.137.11 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page