koleo-cli 0.2.137.22__py3-none-any.whl → 0.2.137.23.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of koleo-cli might be problematic. Click here for more details.
- koleo/api/client.py +26 -2
- koleo/api/types.py +84 -0
- koleo/args.py +8 -3
- koleo/cli/__init__.py +2 -2
- koleo/cli/aliases.py +1 -1
- koleo/cli/base.py +7 -6
- koleo/cli/connections.py +6 -6
- koleo/cli/seats.py +24 -28
- koleo/cli/train_info.py +6 -7
- koleo/cli/utils.py +1 -0
- koleo/storage.py +3 -2
- koleo/utils.py +1 -1
- {koleo_cli-0.2.137.22.dist-info → koleo_cli-0.2.137.23.2.dist-info}/METADATA +1 -1
- koleo_cli-0.2.137.23.2.dist-info/RECORD +26 -0
- koleo_cli-0.2.137.22.dist-info/RECORD +0 -26
- {koleo_cli-0.2.137.22.dist-info → koleo_cli-0.2.137.23.2.dist-info}/WHEEL +0 -0
- {koleo_cli-0.2.137.22.dist-info → koleo_cli-0.2.137.23.2.dist-info}/entry_points.txt +0 -0
- {koleo_cli-0.2.137.22.dist-info → koleo_cli-0.2.137.23.2.dist-info}/licenses/LICENSE +0 -0
- {koleo_cli-0.2.137.22.dist-info → koleo_cli-0.2.137.23.2.dist-info}/top_level.txt +0 -0
koleo/api/client.py
CHANGED
|
@@ -215,7 +215,31 @@ class KoleoAPI(BaseAPIClient):
|
|
|
215
215
|
return res.json().get("price")
|
|
216
216
|
|
|
217
217
|
async def get_current_session(self) -> CurrentSession:
|
|
218
|
-
return (await self.get(
|
|
218
|
+
return (await self.get("/sessions/current", use_auth=True)).json()
|
|
219
219
|
|
|
220
220
|
async def get_current_user(self) -> CurrentUser:
|
|
221
|
-
return (await self.get(
|
|
221
|
+
return (await self.get("/users/current", use_auth=True)).json()
|
|
222
|
+
|
|
223
|
+
async def v3_connection_search(
|
|
224
|
+
self,
|
|
225
|
+
start_station_id: int,
|
|
226
|
+
end_station_id: int,
|
|
227
|
+
brand_ids: list[int],
|
|
228
|
+
date: datetime,
|
|
229
|
+
direct: bool = False,
|
|
230
|
+
) -> list[V3ConnectionResult]:
|
|
231
|
+
data = {
|
|
232
|
+
"start_id": start_station_id,
|
|
233
|
+
"end_id": end_station_id,
|
|
234
|
+
"departure_after": date.isoformat(),
|
|
235
|
+
"only_direct": direct,
|
|
236
|
+
}
|
|
237
|
+
if brand_ids:
|
|
238
|
+
data["allowed_brands"] = brand_ids
|
|
239
|
+
return (await self.post("/api/v2/main/eol_connections/search", json=data)).json()
|
|
240
|
+
|
|
241
|
+
async def v3_get_price(self, id: str) -> V3Price:
|
|
242
|
+
return (await self.get(f"/api/v2/main/eol_connections/{id}/price")).json()
|
|
243
|
+
|
|
244
|
+
async def get_carrier_lines(self, carrier_slug: str) -> list[CarrierLine]:
|
|
245
|
+
return (await self.get(f"/api/v2/main/carrier_lines/{carrier_slug}")).json()["list"]
|
koleo/api/types.py
CHANGED
|
@@ -486,3 +486,87 @@ class TrainAttribute(t.TypedDict):
|
|
|
486
486
|
short_name: str
|
|
487
487
|
rank: int
|
|
488
488
|
warning: bool
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
class AttributeWithAnnotation(t.TypedDict):
|
|
492
|
+
attribute_definition_id: int
|
|
493
|
+
annotation: str
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
class V3LegStop(t.TypedDict):
|
|
497
|
+
station_id: int
|
|
498
|
+
arrival: str
|
|
499
|
+
departure: str
|
|
500
|
+
commercial_brand_id: int
|
|
501
|
+
internal_brand_id: int
|
|
502
|
+
train_nr: int
|
|
503
|
+
platform: str
|
|
504
|
+
track: str
|
|
505
|
+
for_alighting: bool
|
|
506
|
+
for_boarding: bool
|
|
507
|
+
request_stop: bool
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
V3LegType = t.Literal["train_leg"]
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
class V3ConnectionLeg(t.TypedDict):
|
|
514
|
+
leg_type: V3LegType
|
|
515
|
+
train_id: int
|
|
516
|
+
train_nr: int
|
|
517
|
+
train_name: str
|
|
518
|
+
train_full_name: str
|
|
519
|
+
operating_day: str # YYYY-MM-DD
|
|
520
|
+
commercial_brand_id: int
|
|
521
|
+
internal_brand_id: int
|
|
522
|
+
constrictions: list[AttributeWithAnnotation]
|
|
523
|
+
duration: int # minutes
|
|
524
|
+
origin_station_id: int
|
|
525
|
+
destination_station_id: int
|
|
526
|
+
departure: str # iso with tz
|
|
527
|
+
arrival: str
|
|
528
|
+
departure_platform: str # roman
|
|
529
|
+
departure_track: str # arabic
|
|
530
|
+
arrival_platform: str
|
|
531
|
+
arrival_track: str
|
|
532
|
+
stops_before_leg: list[V3LegStop]
|
|
533
|
+
stops_in_leg: list[V3LegStop]
|
|
534
|
+
stops_after_leg: list[V3LegStop]
|
|
535
|
+
attributes: list[AttributeWithAnnotation]
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
class V3ConnectionResult(t.TypedDict):
|
|
539
|
+
uuid: str
|
|
540
|
+
eol_response_version: int
|
|
541
|
+
departure: str # datetime iso
|
|
542
|
+
arrival: str # datetime iso
|
|
543
|
+
origin_station_id: int
|
|
544
|
+
destination_station_id: int
|
|
545
|
+
duration: int # minutes
|
|
546
|
+
changes: int
|
|
547
|
+
constrictions: list[AttributeWithAnnotation]
|
|
548
|
+
legs: list[V3ConnectionLeg]
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
class V3PricePerPassenger(t.TypedDict):
|
|
552
|
+
value: str # zł.gr
|
|
553
|
+
passenger_id: int | None
|
|
554
|
+
|
|
555
|
+
|
|
556
|
+
class V3Price(t.TypedDict):
|
|
557
|
+
price: str # zł.gr
|
|
558
|
+
uncertain: bool
|
|
559
|
+
price_label: str | None
|
|
560
|
+
is_child_birthday_required: bool
|
|
561
|
+
needs_document: bool
|
|
562
|
+
purchasable: bool
|
|
563
|
+
purchasable_errors: list[ErrorDict]
|
|
564
|
+
price_per_passengers: list[V3PricePerPassenger]
|
|
565
|
+
additional_info: str
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
class CarrierLine(t.TypedDict):
|
|
569
|
+
start_station_name: str
|
|
570
|
+
start_station_slug: str
|
|
571
|
+
end_station_name: str
|
|
572
|
+
end_station_slug: str
|
koleo/args.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from argparse import ArgumentParser
|
|
2
|
+
from asyncio import run, create_task, CancelledError
|
|
2
3
|
from datetime import datetime
|
|
3
|
-
from asyncio import run
|
|
4
4
|
from inspect import isawaitable
|
|
5
5
|
|
|
6
6
|
from .api import KoleoAPI
|
|
@@ -245,7 +245,9 @@ def main():
|
|
|
245
245
|
default=False,
|
|
246
246
|
)
|
|
247
247
|
train_connection_stats.add_argument("connection_id", help="The koleo ID", type=int)
|
|
248
|
-
train_connection_stats.set_defaults(
|
|
248
|
+
train_connection_stats.set_defaults(
|
|
249
|
+
func=cli.train_connection_stats_view, pass_=["connection_id", "type", "detailed"]
|
|
250
|
+
)
|
|
249
251
|
|
|
250
252
|
aliases = subparsers.add_parser("aliases", help="Save quick aliases for station names!")
|
|
251
253
|
aliases.set_defaults(func=cli.alias_list_view)
|
|
@@ -278,7 +280,10 @@ def main():
|
|
|
278
280
|
async def run_view(func, *args, **kwargs):
|
|
279
281
|
res = func(*args, **kwargs)
|
|
280
282
|
if isawaitable(res):
|
|
281
|
-
|
|
283
|
+
try:
|
|
284
|
+
await res
|
|
285
|
+
except SystemExit:
|
|
286
|
+
...
|
|
282
287
|
await client.close()
|
|
283
288
|
|
|
284
289
|
cli.client, cli.storage = client, storage
|
koleo/cli/__init__.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
from .aliases import Aliases
|
|
2
|
-
from .station_board import StationBoard
|
|
3
2
|
from .connections import Connections
|
|
4
|
-
from .train_info import TrainInfo
|
|
5
3
|
from .seats import Seats
|
|
4
|
+
from .station_board import StationBoard
|
|
6
5
|
from .stations import Stations
|
|
6
|
+
from .train_info import TrainInfo
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class CLI(Aliases, StationBoard, Connections, Seats, Stations): ...
|
koleo/cli/aliases.py
CHANGED
|
@@ -3,7 +3,7 @@ from .base import BaseCli
|
|
|
3
3
|
|
|
4
4
|
class Aliases(BaseCli):
|
|
5
5
|
def alias_list_view(self):
|
|
6
|
-
self.print(
|
|
6
|
+
self.print("[bold][green]alias[/green] → [red]station[/red][/bold]:")
|
|
7
7
|
for n, (k, v) in enumerate(self.storage.aliases.items()):
|
|
8
8
|
self.print(f"{n}. [bold][green]{k}[/green] → [red]{v}[/red][/bold]")
|
|
9
9
|
|
koleo/cli/base.py
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
from koleo.storage import Storage
|
|
3
|
-
from koleo.api.types import ExtendedStationInfo, TrainOnStationInfo, TrainStop
|
|
4
|
-
from koleo.utils import koleo_time_to_dt, name_to_slug, convert_platform_number
|
|
1
|
+
import re
|
|
5
2
|
|
|
6
3
|
from rich.console import Console
|
|
7
|
-
|
|
4
|
+
|
|
5
|
+
from koleo.api import KoleoAPI
|
|
6
|
+
from koleo.api.types import ExtendedStationInfo, TrainOnStationInfo, TrainStop
|
|
7
|
+
from koleo.storage import Storage
|
|
8
|
+
from koleo.utils import convert_platform_number, koleo_time_to_dt, name_to_slug
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
class BaseCli:
|
|
@@ -109,7 +110,7 @@ class BaseCli:
|
|
|
109
110
|
brands = await self.get_brands()
|
|
110
111
|
s = s.upper()
|
|
111
112
|
if name and "SŁONECZNY" in name and s == "KM":
|
|
112
|
-
return "SLONECZNY"
|
|
113
|
+
return "SLONECZNY" # OH MY FUCKING GOD
|
|
113
114
|
if s == "AR":
|
|
114
115
|
return "ARRIVARP"
|
|
115
116
|
if s not in [i["name"] for i in brands]:
|
koleo/cli/connections.py
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
from asyncio import gather
|
|
2
|
-
|
|
3
|
-
from .base import BaseCli
|
|
4
|
-
from .utils import format_price
|
|
5
|
-
|
|
6
2
|
from datetime import datetime, timedelta
|
|
3
|
+
|
|
7
4
|
from koleo.api.types import ConnectionDetail
|
|
8
5
|
from koleo.utils import koleo_time_to_dt
|
|
9
6
|
|
|
7
|
+
from .base import BaseCli
|
|
8
|
+
from .utils import format_price
|
|
9
|
+
|
|
10
10
|
|
|
11
11
|
class Connections(BaseCli):
|
|
12
12
|
async def connections_view(
|
|
@@ -33,7 +33,7 @@ class Connections(BaseCli):
|
|
|
33
33
|
if i["name"].lower().strip() in brands or i["logo_text"].lower().strip() in brands
|
|
34
34
|
}
|
|
35
35
|
if not connection_brands:
|
|
36
|
-
await self.error_and_exit(f'No brands match: [underline]{
|
|
36
|
+
await self.error_and_exit(f'No brands match: [underline]{", ".join(brands)}[/underline]')
|
|
37
37
|
results: list[ConnectionDetail] = []
|
|
38
38
|
fetch_date = date
|
|
39
39
|
while len(results) < length:
|
|
@@ -76,7 +76,7 @@ class Connections(BaseCli):
|
|
|
76
76
|
else:
|
|
77
77
|
price_str = ""
|
|
78
78
|
parts.append(
|
|
79
|
-
f"[bold green][link=https://koleo.pl/
|
|
79
|
+
f"[bold green][link=https://koleo.pl/p/{i["id"]}]{date_part}{dep.strftime("%H:%M")} - {arr.strftime("%H:%M")}[/bold green] {travel_time//3600}h{(travel_time % 3600)/60:.0f}m {i['distance']}km{price_str}:[/link]"
|
|
80
80
|
)
|
|
81
81
|
if len(i["trains"]) == 1:
|
|
82
82
|
train = i["trains"][0]
|
koleo/cli/seats.py
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import typing as t
|
|
2
|
+
from asyncio import gather
|
|
2
3
|
from datetime import datetime
|
|
3
4
|
from asyncio import gather
|
|
4
5
|
|
|
5
|
-
from koleo.api import
|
|
6
|
-
|
|
6
|
+
from koleo.api import SeatState, SeatsAvailabilityResponse
|
|
7
7
|
from koleo.utils import BRAND_SEAT_TYPE_MAPPING, koleo_time_to_dt
|
|
8
|
+
|
|
9
|
+
from .train_info import TrainInfo
|
|
8
10
|
from .utils import CLASS_COLOR_MAP
|
|
9
11
|
|
|
10
12
|
|
|
@@ -49,16 +51,20 @@ class Seats(TrainInfo):
|
|
|
49
51
|
direct=True,
|
|
50
52
|
date=koleo_time_to_dt(train_stops_by_slug[first_station]["departure"], base_date=date),
|
|
51
53
|
)
|
|
52
|
-
connection = next(
|
|
54
|
+
connection = next(
|
|
55
|
+
iter(i for i in connections if i["trains"][0]["train_id"] == train_details["train"]["id"]), None
|
|
56
|
+
)
|
|
53
57
|
if connection is None:
|
|
54
|
-
await self.error_and_exit("Train not found
|
|
58
|
+
await self.error_and_exit("Train connection not found:<\nplease try clearing the cache")
|
|
55
59
|
connection_train = connection["trains"][0]
|
|
56
60
|
if connection_train["brand_id"] not in BRAND_SEAT_TYPE_MAPPING:
|
|
57
61
|
await self.error_and_exit(f"Brand [underline]{connection_train["brand_id"]}[/underline] is not supported.")
|
|
58
62
|
await self.show_train_header(
|
|
59
63
|
train_details, train_stops_by_slug[first_station], train_stops_by_slug[last_station]
|
|
60
64
|
)
|
|
61
|
-
await self.train_seat_info(
|
|
65
|
+
await self.train_seat_info(
|
|
66
|
+
connection["id"], type, connection_train["brand_id"], connection_train["train_nr"], detailed=detailed
|
|
67
|
+
)
|
|
62
68
|
|
|
63
69
|
async def train_connection_stats_view(self, connection_id: int, type: str | None, detailed: bool = False):
|
|
64
70
|
connection = await self.client.get_connection(connection_id)
|
|
@@ -72,13 +78,7 @@ class Seats(TrainInfo):
|
|
|
72
78
|
await self.train_seat_info(connection_id, type, train["brand_id"], train["train_nr"], detailed=detailed)
|
|
73
79
|
|
|
74
80
|
async def train_seat_info(
|
|
75
|
-
self,
|
|
76
|
-
connection_id: int,
|
|
77
|
-
type: str | None,
|
|
78
|
-
brand_id: int,
|
|
79
|
-
train_nr: int,
|
|
80
|
-
*,
|
|
81
|
-
detailed: bool = False
|
|
81
|
+
self, connection_id: int, type: str | None, brand_id: int, train_nr: int, *, detailed: bool = False
|
|
82
82
|
):
|
|
83
83
|
seat_name_map = BRAND_SEAT_TYPE_MAPPING[brand_id]
|
|
84
84
|
if type is not None:
|
|
@@ -98,26 +98,22 @@ class Seats(TrainInfo):
|
|
|
98
98
|
for seat in result["seats"]:
|
|
99
99
|
counters[seat["state"]] += 1
|
|
100
100
|
color = CLASS_COLOR_MAP.get(seat_name_map[seat_type], "")
|
|
101
|
-
self.print(f"[bold {color}]{seat_name_map[seat_type]}: [/bold {color}]")
|
|
102
101
|
total = sum(i for i in counters.values())
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
)
|
|
106
|
-
self.print(
|
|
107
|
-
|
|
108
|
-
)
|
|
109
|
-
self.print(
|
|
110
|
-
f" Blocked: [underline {color}]{counters["BLOCKED"]}[/underline {color}]"
|
|
111
|
-
)
|
|
102
|
+
if not total:
|
|
103
|
+
continue
|
|
104
|
+
self.print(f"[bold {color}]{seat_name_map[seat_type]}: [/bold {color}]")
|
|
105
|
+
self.print(f" Free: [{color}]{counters["FREE"]}/{total}, ~{counters["FREE"]/total*100:.1f}%[/{color}]")
|
|
106
|
+
self.print(f" Reserved: [{color}]{counters["RESERVED"]}[/{color}]")
|
|
107
|
+
self.print(f" Blocked: [underline {color}]{counters["BLOCKED"]}[/underline {color}]")
|
|
112
108
|
taken = counters["BLOCKED"] + counters["RESERVED"]
|
|
113
|
-
self.print(
|
|
114
|
-
f" Total: [underline {color}]{taken}/{total}, ~{taken/total*100:.1f}%[/underline {color}]"
|
|
115
|
-
)
|
|
109
|
+
self.print(f" Total: [underline {color}]{taken}/{total}, ~{taken/total*100:.1f}%[/underline {color}]")
|
|
116
110
|
|
|
117
|
-
if detailed:
|
|
111
|
+
if detailed: # super temporary!!!!!!
|
|
118
112
|
for seat_type, result in res.items():
|
|
119
113
|
type_color = CLASS_COLOR_MAP.get(seat_name_map[seat_type], "")
|
|
120
114
|
self.print(f"[bold {type_color}]{seat_name_map[seat_type]}: [/bold {type_color}]")
|
|
121
115
|
for seat in result["seats"]:
|
|
122
116
|
color = "green" if seat["state"] == "FREE" else "red"
|
|
123
|
-
self.print(
|
|
117
|
+
self.print(
|
|
118
|
+
f" [{type_color}]{seat["carriage_nr"]}[/{type_color}] {seat['seat_nr']}: [{color}]{seat["state"]}[/{color}]"
|
|
119
|
+
)
|
koleo/cli/train_info.py
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
from .base import BaseCli
|
|
2
1
|
from asyncio import gather
|
|
3
|
-
|
|
4
2
|
from datetime import datetime, timedelta
|
|
3
|
+
|
|
5
4
|
from koleo.api.types import TrainCalendar, TrainDetailResponse, TrainStop
|
|
6
5
|
from koleo.utils import koleo_time_to_dt
|
|
7
6
|
|
|
7
|
+
from .base import BaseCli
|
|
8
|
+
|
|
8
9
|
|
|
9
10
|
class TrainInfo(BaseCli):
|
|
10
11
|
async def get_train_calendars(self, brand: str, name: str) -> list[TrainCalendar]:
|
|
@@ -13,7 +14,7 @@ class TrainInfo(BaseCli):
|
|
|
13
14
|
if len(name_parts) == 1 and name_parts[0].isnumeric():
|
|
14
15
|
number = int(name_parts[0])
|
|
15
16
|
train_name = ""
|
|
16
|
-
elif len(
|
|
17
|
+
elif len(name_parts) > 1:
|
|
17
18
|
number = int(name_parts.pop(0))
|
|
18
19
|
train_name = " ".join(name_parts)
|
|
19
20
|
else:
|
|
@@ -22,7 +23,7 @@ class TrainInfo(BaseCli):
|
|
|
22
23
|
cache_id = f"tc-{brand}-{number}-{name}"
|
|
23
24
|
try:
|
|
24
25
|
train_calendars = self.storage.get_cache(cache_id) or self.storage.set_cache(
|
|
25
|
-
cache_id, await self.client.get_train_calendars(brand, number, train_name)
|
|
26
|
+
cache_id, await self.client.get_train_calendars(brand, number, train_name), ttl=3600
|
|
26
27
|
)
|
|
27
28
|
except self.client.errors.KoleoNotFound:
|
|
28
29
|
await self.error_and_exit(f"Train not found: [underline]nr={number}, name={train_name}[/underline]")
|
|
@@ -95,9 +96,7 @@ class TrainInfo(BaseCli):
|
|
|
95
96
|
brand = brand_obj.get("logo_text", "")
|
|
96
97
|
url_brand = await self.get_brand_by_shortcut(brand, name=train_details["train"]["train_full_name"])
|
|
97
98
|
|
|
98
|
-
link = (
|
|
99
|
-
f"https://koleo.pl/pociag/{url_brand}/{train_details["train"]["train_full_name"].replace(" ", "-", 1).replace(" ", "%20")}"
|
|
100
|
-
)
|
|
99
|
+
link = f"https://koleo.pl/pociag/{url_brand}/{train_details["train"]["train_full_name"].replace(" ", "-", 1).replace(" ", "%20")}"
|
|
101
100
|
if date:
|
|
102
101
|
link += f"/{date}"
|
|
103
102
|
self.print(
|
koleo/cli/utils.py
CHANGED
koleo/storage.py
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import typing as t
|
|
2
2
|
from dataclasses import asdict, dataclass, field
|
|
3
|
-
from orjson import dumps, loads
|
|
4
3
|
from os import makedirs
|
|
5
4
|
from os import path as ospath
|
|
6
5
|
from sys import platform
|
|
7
6
|
from time import time
|
|
8
7
|
|
|
8
|
+
from orjson import dumps, loads
|
|
9
|
+
|
|
9
10
|
|
|
10
11
|
if t.TYPE_CHECKING:
|
|
11
12
|
from yt_dlp.cookies import YoutubeDLCookieJar
|
|
@@ -90,7 +91,7 @@ class Storage:
|
|
|
90
91
|
def load(cls, *, path: str = DEFAULT_CONFIG_PATH, ignore_cache: bool = False) -> t.Self:
|
|
91
92
|
expanded = ospath.expanduser(path)
|
|
92
93
|
if ospath.exists(expanded):
|
|
93
|
-
with open(expanded) as f:
|
|
94
|
+
with open(expanded, "rb") as f:
|
|
94
95
|
data = {k: v for k, v in loads(f.read()).items() if k in cls.__dataclass_fields__}
|
|
95
96
|
else:
|
|
96
97
|
data = {}
|
koleo/utils.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from argparse import Action
|
|
2
2
|
from datetime import datetime, time, timedelta
|
|
3
3
|
|
|
4
|
-
from .api.types import
|
|
4
|
+
from .api.types import CarriageType, SeatsAvailabilityResponse, TimeDict, TrainComposition
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
def parse_datetime(s: str):
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
koleo/__init__.py,sha256=dp6PfGcuWP50QBWhjnT-zS03l3KzzYnMJnUeYMKBayc,51
|
|
2
|
+
koleo/__main__.py,sha256=zRwdn7wRjqzWyDIoQ8PDDd_K2GizFIto35uO-mGFwsQ,63
|
|
3
|
+
koleo/args.py,sha256=Mqriu5M_ui8D5P2MVo3NAS_S0DE-T5Q_1Conb4eSIbE,11140
|
|
4
|
+
koleo/storage.py,sha256=F_0q-xt0jLQk--dfM8fmyG1tkfaM9d5Rh3sEwYzqGVs,4594
|
|
5
|
+
koleo/utils.py,sha256=s58W1zNWQm1KFvvCunRVibrb-Zd7Rd1xWSZkxqr5zYw,4631
|
|
6
|
+
koleo/api/__init__.py,sha256=3TfO8eBJcDCDXvIFobgyvN3Sfa1kQ2U0lm7gxEAsaWQ,50
|
|
7
|
+
koleo/api/base.py,sha256=8wAasDQ1DBDI1PsPESmS3iUE5csIgaGT4DOX_A-hPwI,2070
|
|
8
|
+
koleo/api/client.py,sha256=h2pGGsE8dZe5bePDOKOonSokMnoqgWE9aIWUcZBjPfs,9346
|
|
9
|
+
koleo/api/errors.py,sha256=J9g75K9_yvnZ-7Hi521h0yGcw9NUNnTprQsIZ_mclO0,1324
|
|
10
|
+
koleo/api/logging.py,sha256=VhOFY6N_mofFfg9ZJ5ZnDVCzNuRilqLqrzZU9b-hpZY,1644
|
|
11
|
+
koleo/api/types.py,sha256=EGApqn-YuD1_9LxwsAttNT6kjFdQ7Ll4YQzT18Q--Q0,12574
|
|
12
|
+
koleo/cli/__init__.py,sha256=AFG1RddD3iHryKrlBLC7nAPYOXNAnbwd6ps1ZDUW1lQ,266
|
|
13
|
+
koleo/cli/aliases.py,sha256=RroIzuMFntUQABdj6SAYab2lH5SRTnUT8FtemNp1wHg,580
|
|
14
|
+
koleo/cli/base.py,sha256=dtrPjcLB8GLoQM0yg5zPO6Xjln96aibX39EsjFTCeA4,4956
|
|
15
|
+
koleo/cli/connections.py,sha256=DwfiwquRDH6PCcQHMciVXQCVocmX4zSlPCD_xCfpLa8,6860
|
|
16
|
+
koleo/cli/seats.py,sha256=cswhtDQtJn3Y3LObAyt7sRfjkAyD6-8clMfh2j_0eyY,6399
|
|
17
|
+
koleo/cli/station_board.py,sha256=lRGIeEKEOvUcctM6cwmqVE7Yk9m9R12gfFZahlWLQFc,3669
|
|
18
|
+
koleo/cli/stations.py,sha256=6L3PBWc6xssyR9eeLacuvGBJmaY7Ny3DalKy2Xq7zsA,1633
|
|
19
|
+
koleo/cli/train_info.py,sha256=HDTC3Rz0X14d6OuOey5NinxOaywR7jeVDEgGEUX11c4,7157
|
|
20
|
+
koleo/cli/utils.py,sha256=ISbsabi6fBdCO2tf7X2FjodeG3iRjngFPW93VqMeLq4,667
|
|
21
|
+
koleo_cli-0.2.137.23.2.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
22
|
+
koleo_cli-0.2.137.23.2.dist-info/METADATA,sha256=qrDF3q9EzRIxYmOwUnHOEOsM6YZLb5J2W7XOZONLBvY,4733
|
|
23
|
+
koleo_cli-0.2.137.23.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
24
|
+
koleo_cli-0.2.137.23.2.dist-info/entry_points.txt,sha256=ouWbMR_XWpEwV7zfkFKeiFLe_IMP-47kTvVahgy4PRg,42
|
|
25
|
+
koleo_cli-0.2.137.23.2.dist-info/top_level.txt,sha256=AlWdXotkRYzHpFfOBYi6xOXl1H0zq4-tqtZ2XivoWB4,6
|
|
26
|
+
koleo_cli-0.2.137.23.2.dist-info/RECORD,,
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
koleo/__init__.py,sha256=dp6PfGcuWP50QBWhjnT-zS03l3KzzYnMJnUeYMKBayc,51
|
|
2
|
-
koleo/__main__.py,sha256=zRwdn7wRjqzWyDIoQ8PDDd_K2GizFIto35uO-mGFwsQ,63
|
|
3
|
-
koleo/args.py,sha256=glXMFflV4TMHA1JYEFf54MCry2bSLEOa7ap8bPiJZA0,11025
|
|
4
|
-
koleo/storage.py,sha256=_-vpcO6MwbTsnCNWhaHe9xRKm9jpO0Xl0OOyXSmZJzs,4587
|
|
5
|
-
koleo/utils.py,sha256=OAjm90SN1BqpgNF8OTAaR9atyLNYIGy5owZ2pLP5OAM,4631
|
|
6
|
-
koleo/api/__init__.py,sha256=3TfO8eBJcDCDXvIFobgyvN3Sfa1kQ2U0lm7gxEAsaWQ,50
|
|
7
|
-
koleo/api/base.py,sha256=8wAasDQ1DBDI1PsPESmS3iUE5csIgaGT4DOX_A-hPwI,2070
|
|
8
|
-
koleo/api/client.py,sha256=Ru5M5ntp2vpQQI4VUaD1TCLIjNtJB4tkNCB4y766DUU,8457
|
|
9
|
-
koleo/api/errors.py,sha256=J9g75K9_yvnZ-7Hi521h0yGcw9NUNnTprQsIZ_mclO0,1324
|
|
10
|
-
koleo/api/logging.py,sha256=VhOFY6N_mofFfg9ZJ5ZnDVCzNuRilqLqrzZU9b-hpZY,1644
|
|
11
|
-
koleo/api/types.py,sha256=udCQeDjRvUqrUkuE_-Jidzsq_FOCjNyGd_bQWm3f9iA,10594
|
|
12
|
-
koleo/cli/__init__.py,sha256=50B_lMtZS27_FVrkIa2TOWMX7SozG1CPPMxbY1W9tqk,266
|
|
13
|
-
koleo/cli/aliases.py,sha256=is3NX5g0-ujJTmyjlFLoNnK_pwoYUVIojWNkgwXRBKk,581
|
|
14
|
-
koleo/cli/base.py,sha256=4vnQ4HS5GD6WXReWiJs1E7Bt8cDU4anlZCDb8xXqXS0,4954
|
|
15
|
-
koleo/cli/connections.py,sha256=LJzoq3ADVUmBeqF4-h_me3pZbBHYg1sG3MaDYprwuLU,6873
|
|
16
|
-
koleo/cli/seats.py,sha256=h7pRWdeQ8frHD1ZuiGZO6UGQRboty9PtiVHg49lkw4Q,6337
|
|
17
|
-
koleo/cli/station_board.py,sha256=lRGIeEKEOvUcctM6cwmqVE7Yk9m9R12gfFZahlWLQFc,3669
|
|
18
|
-
koleo/cli/stations.py,sha256=6L3PBWc6xssyR9eeLacuvGBJmaY7Ny3DalKy2Xq7zsA,1633
|
|
19
|
-
koleo/cli/train_info.py,sha256=wWsbbvpNmm54_0FBvr_TEhhplhD8byKKYs_VvfpvOcs,7164
|
|
20
|
-
koleo/cli/utils.py,sha256=FzPGcJdwRwcz10mYiW63Y4zpjM9j6DzNH91UNR3MS8s,666
|
|
21
|
-
koleo_cli-0.2.137.22.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
22
|
-
koleo_cli-0.2.137.22.dist-info/METADATA,sha256=QQehYoUOPqA7BiVk7szVD7ZtBZ7vKqoWF0ClMndHITU,4731
|
|
23
|
-
koleo_cli-0.2.137.22.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
24
|
-
koleo_cli-0.2.137.22.dist-info/entry_points.txt,sha256=ouWbMR_XWpEwV7zfkFKeiFLe_IMP-47kTvVahgy4PRg,42
|
|
25
|
-
koleo_cli-0.2.137.22.dist-info/top_level.txt,sha256=AlWdXotkRYzHpFfOBYi6xOXl1H0zq4-tqtZ2XivoWB4,6
|
|
26
|
-
koleo_cli-0.2.137.22.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|