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
  • add station aliases to query them more easily
  • check seat allocation statistics

coming soon™️:

  • TUI ticket purchase interface
  • ticket display
  • your previous tickets + stats
  • find empty compartments 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 koleo-cli.json config file
  • most api queries are cached for 24h
    • you can change it by adding disable_cache: true to your koleo-cli.json config file
  • stations/ls uses emojis by default
    • you can disable them by adding use_country_flags_emoji: false and use_country_flags_emoji: false to your koleo-cli.json config file pull requests are welcome!!
usage: koleo [-h] [-c CONFIG] [--nocolor]
             {departures,d,dep,odjazdy,o,arrivals,a,arr,przyjazdy,p,all,w,wszystkie,all_trains,pociagi,trainroute,r,tr,t,poc,pociąg,traincalendar,kursowanie,tc,k,traindetail,td,tid,id,idpoc,stations,s,find,f,stacje,ls,q,connections,do,z,szukaj,path,trainstats,ts,tp,miejsca,frekwencja,trainconnectionstats,tcs,aliases} ...

Koleo CLI

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

actions:
  {departures,d,dep,odjazdy,o,arrivals,a,arr,przyjazdy,p,all,w,wszystkie,all_trains,pociagi,trainroute,r,tr,t,poc,pociąg,traincalendar,kursowanie,tc,k,traindetail,td,tid,id,idpoc,stations,s,find,f,stacje,ls,q,connections,do,z,szukaj,path,trainstats,ts,tp,miejsca,frekwencja,trainconnectionstats,tcs,aliases}
    departures (d, dep, odjazdy, o)
                        Allows you to list station departures
    arrivals (a, arr, przyjazdy, p)
                        Allows you to list station departures
    all (w, wszystkie, all_trains, pociagi)
                        Allows you to list all station trains
    trainroute (r, tr, t, poc, pociąg)
                        Allows you to check the train's route
    traincalendar (kursowanie, tc, k)
                        Allows you to check what days the train runs on
    traindetail (td, tid, id, idpoc)
                        Allows you to show the train's route given it's koleo ID
    stations (s, find, f, stacje, ls, q)
                        Allows you to find stations by their name
    connections (do, z, szukaj, path)
                        Allows you to search for connections from a to b
    trainstats (ts, tp, miejsca, frekwencja)
                        Allows you to check seat allocation info for a train.
    trainconnectionstats (tcs)
                        Allows you to check the seat allocations on the train connection given it's koleo ID
    aliases             Save quick aliases for station names!

Metadata

Release files for koleo-cli 0.2.137.21

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.21
File Size Uploaded Provenance Actions
koleo_cli-0.2.137.21.tar.gz 36.5 kB Without provenance Details for koleo_cli-0.2.137.21.tar.gz

Built distribution (wheel)

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

Total release size: 76.0 kB

Release files / koleo_cli-0.2.137.21.tar.gz

Download URL koleo_cli-0.2.137.21.tar.gz
Size 36.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6719554523e156eb5d3a4ee4c99323ddb3a86e6654a8377530044bc5cea43e3c
BLAKE2b-256 checksum
How to use checksums
a9aa942a151f48c930eb5cc1639167a1c5a63905b1053f0fba065f997b7e6e54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.23

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

Download URL koleo_cli-0.2.137.21-py3-none-any.whl
Size 39.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8b587f458573811ae075fb1b4abf7709be5f308397915f89fe9c924b1bb708fa
BLAKE2b-256 checksum
How to use checksums
835208fe11be90c54d7c05924c7f8931889a8f7e79df6936d39f6a510c8cef20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.23

Security for koleo-cli 0.2.137.21

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.137.21 This release

2 release files No provenance

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