apyefa 0.0.6__py3-none-any.whl → 1.0.0__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 apyefa might be problematic. Click here for more details.
- apyefa/client.py +543 -52
- apyefa/commands/__init__.py +12 -0
- apyefa/commands/command.py +97 -53
- apyefa/commands/command_add_info.py +60 -0
- apyefa/commands/command_coord.py +45 -0
- apyefa/commands/command_departures.py +4 -5
- apyefa/commands/command_geoobject.py +42 -0
- apyefa/commands/command_line_list.py +46 -0
- apyefa/commands/command_line_stop.py +39 -0
- apyefa/commands/command_serving_lines.py +8 -18
- apyefa/commands/command_stop_finder.py +4 -6
- apyefa/commands/command_stop_list.py +48 -0
- apyefa/commands/command_system_info.py +3 -3
- apyefa/commands/command_trip.py +26 -5
- apyefa/data_classes.py +191 -66
- apyefa/helpers.py +61 -0
- apyefa-1.0.0.dist-info/METADATA +125 -0
- apyefa-1.0.0.dist-info/RECORD +27 -0
- apyefa-0.0.6.dist-info/METADATA +0 -430
- apyefa-0.0.6.dist-info/RECORD +0 -21
- {apyefa-0.0.6.dist-info → apyefa-1.0.0.dist-info}/LICENSE +0 -0
- {apyefa-0.0.6.dist-info → apyefa-1.0.0.dist-info}/WHEEL +0 -0
- {apyefa-0.0.6.dist-info → apyefa-1.0.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
apyefa/__init__.py,sha256=9LuZCm4L02Jz-rgvSyTSQ10fzMEZ0P2nWQQ6m3Z9Ab0,386
|
|
2
|
+
apyefa/client.py,sha256=eqya_wwCNM1AmDW2LkIwxY0YVJa-NU3BOv4VaXQE4dc,27226
|
|
3
|
+
apyefa/data_classes.py,sha256=NkPBZq0A91Dn_6B5cktU9rhdvNd8gdddHqRpZZ1cnEI,14968
|
|
4
|
+
apyefa/exceptions.py,sha256=Vhc8FEtI1xSxbVRLFXd3BlNTekY2w3byEvd3Jhhg8h4,240
|
|
5
|
+
apyefa/helpers.py,sha256=WGXQ2SwlQ5IB57_ab0ry3QAqL-iDWqtOOwP0yhQI5ck,3531
|
|
6
|
+
apyefa/commands/__init__.py,sha256=h5cyzFXA6vJQgUx7LyngoXxXo11ULvVku9GFuVwvkic,848
|
|
7
|
+
apyefa/commands/command.py,sha256=vx0eBavmfOxxKsn63TWK1tHscjoVtxFDo-vIR9HRbxA,5486
|
|
8
|
+
apyefa/commands/command_add_info.py,sha256=iNGFU-SzBY2W5XLghNT4o-oQUc-Qhn3XNQ3ShvfgQDc,2467
|
|
9
|
+
apyefa/commands/command_coord.py,sha256=rNWiVM2AnHrvPOA3saRIuwQ5POBzZBbeEDsYyM0NklA,1415
|
|
10
|
+
apyefa/commands/command_departures.py,sha256=28po1kDWJ37gGO_ERlDsPoPgNkCWR_lfE5KAVhZWt-E,1874
|
|
11
|
+
apyefa/commands/command_geoobject.py,sha256=VQhw4BB3IkrNI7uJV73M46L1773Ynbwq3iv6O6QoxeI,1261
|
|
12
|
+
apyefa/commands/command_line_list.py,sha256=HDVApNI-ujM7c5K295S1JOVDuL1vk1qb4kq3EJKBwro,1484
|
|
13
|
+
apyefa/commands/command_line_stop.py,sha256=scqr5rUuy8KIyq4W_Lr57udUPzqGXFox5V5z89YHdZw,1096
|
|
14
|
+
apyefa/commands/command_serving_lines.py,sha256=LGSNyFmg18JvZ85lRYfMTZ5X1VZQoBDO5gEO8gQ0ErA,1900
|
|
15
|
+
apyefa/commands/command_stop_finder.py,sha256=w54nLMi5mRWQIDxGHgQpGx4yTITtCUX0D0aT4Y6cozI,2015
|
|
16
|
+
apyefa/commands/command_stop_list.py,sha256=ouCPxUcg4arQVujCYpYHwNAZUHDrVxbkQalsrKSwREs,1602
|
|
17
|
+
apyefa/commands/command_system_info.py,sha256=n-XHH2PL-kBJj5RTVrrpPjruDpUKjTJCZbJQ6cq21lo,885
|
|
18
|
+
apyefa/commands/command_trip.py,sha256=oSA4MkCMIIlWHIQHchU3RWyLxmtdu6cWoe2xhYcIafc,2218
|
|
19
|
+
apyefa/commands/parsers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
|
+
apyefa/commands/parsers/parser.py,sha256=1PSlLpfYrNeKRTpvCcYsCzAKlNrs0oHvSN7zpF4Xcs8,140
|
|
21
|
+
apyefa/commands/parsers/rapid_json_parser.py,sha256=UMexRiMKkJLcK5EEj80B6RYkWBuR8ZWD3YpeGa0J3lQ,212
|
|
22
|
+
apyefa/commands/parsers/xml_parser.py,sha256=ru52QtBP68KoTZ8OgjFWrLy-PD4_j1miY8Zv5umNSE8,151
|
|
23
|
+
apyefa-1.0.0.dist-info/LICENSE,sha256=C2Gdvb1B39BeEP-RGqVd7w6j94GnJo4gnYyiC_l3SFQ,1066
|
|
24
|
+
apyefa-1.0.0.dist-info/METADATA,sha256=UbBBddurMS0YndRrnFSurXo0SlxrLEq7_F5w1UYSMLY,6113
|
|
25
|
+
apyefa-1.0.0.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
26
|
+
apyefa-1.0.0.dist-info/top_level.txt,sha256=b9VSv2S7lxdaypCumxO92IEQFpJdFuB8vQs03j5gZxY,7
|
|
27
|
+
apyefa-1.0.0.dist-info/RECORD,,
|
apyefa-0.0.6.dist-info/METADATA
DELETED
|
@@ -1,430 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: apyefa
|
|
3
|
-
Version: 0.0.6
|
|
4
|
-
Summary: Python API for EFA(Elektronische Fahrplanauskunft) async requests
|
|
5
|
-
Author-email: Alex Jung <jungdevelop@gmail.com>
|
|
6
|
-
License: MIT License
|
|
7
|
-
|
|
8
|
-
Copyright (c) 2024 Alex Jung
|
|
9
|
-
|
|
10
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
-
in the Software without restriction, including without limitation the rights
|
|
13
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
-
furnished to do so, subject to the following conditions:
|
|
16
|
-
|
|
17
|
-
The above copyright notice and this permission notice shall be included in all
|
|
18
|
-
copies or substantial portions of the Software.
|
|
19
|
-
|
|
20
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
-
SOFTWARE.
|
|
27
|
-
Project-URL: Homepage, https://github.com/alex-jung/apyefa
|
|
28
|
-
Project-URL: Documentation, https://github.com/alex-jung/apyefa
|
|
29
|
-
Project-URL: Repository, https://github.com/alex-jung/apyefa
|
|
30
|
-
Project-URL: Issues, https://github.com/alex-jung/apyefa/issues
|
|
31
|
-
Keywords: efa,public transport,traffic
|
|
32
|
-
Requires-Python: >=3.11
|
|
33
|
-
Description-Content-Type: text/markdown
|
|
34
|
-
License-File: LICENSE
|
|
35
|
-
Requires-Dist: aiohttp>=3.11.7
|
|
36
|
-
Requires-Dist: voluptuous>=0.15.2
|
|
37
|
-
Requires-Dist: tzdata>=2024.2
|
|
38
|
-
Provides-Extra: tests
|
|
39
|
-
Requires-Dist: coverage>=5.0.3; extra == "tests"
|
|
40
|
-
Requires-Dist: pytest-cov; extra == "tests"
|
|
41
|
-
Requires-Dist: pytest; extra == "tests"
|
|
42
|
-
Requires-Dist: pytest-asyncio>=0.24.0; extra == "tests"
|
|
43
|
-
Requires-Dist: pytest-benchmark[histogram]>=3.2.1; extra == "tests"
|
|
44
|
-
Requires-Dist: requests>=2.32.3; extra == "tests"
|
|
45
|
-
|
|
46
|
-
# apyefa
|
|
47
|
-
[](https://github.com/alex-jung/apyefa/actions/workflows/python-package.yml)
|
|
48
|
-
[](https://opensource.org/licenses/MIT)
|
|
49
|
-
# Intro
|
|
50
|
-
**apyefa** is a python package used to asynchronously fetch public transit routing data via EFA interfaces like [efa.vgn](https://efa.vgn.de/vgnExt_oeffi/"). It can request itineraries for Bus/Trams/Subways etc. connections and return data in a human and machine readable format.
|
|
51
|
-
# Installation
|
|
52
|
-
You only need to install the **apyefa** package, for example using pip:
|
|
53
|
-
``` bash
|
|
54
|
-
pip install apyefa
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
# Restrictions
|
|
58
|
-
Currently the package supports only endpoints using [RapidJSON](https://rapidjson.org/) format. To check whether the endpoint supports this format, please call:
|
|
59
|
-
``` bash
|
|
60
|
-
To describe(!)
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
# Development setup
|
|
64
|
-
Create and activate virtual environment. Then install dependencies required by `apefa` package.
|
|
65
|
-
``` bash
|
|
66
|
-
python3 -m venv .venv
|
|
67
|
-
source .venv/bin/activate
|
|
68
|
-
pip install .
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
# EfaClient functions
|
|
72
|
-
|Function name |Implementation |Documentation |
|
|
73
|
-
|----------------------------------------------------|------------------|------------------|
|
|
74
|
-
|[info()](#info) |:white_check_mark:|:white_check_mark:|
|
|
75
|
-
|[locations_by_name()](#locations_by_name) |:white_check_mark:|:white_check_mark:|
|
|
76
|
-
|[location_by_coord()](#locations_by_coord) |:white_check_mark:|:white_check_mark:|
|
|
77
|
-
|[trip()](#trip) |:x: |:x: |
|
|
78
|
-
|[departures_by_location()](#departures_by_location) |:white_check_mark:|:white_check_mark:|
|
|
79
|
-
|[lines_by_name()](#lines_by_name) |:white_check_mark:|:white_check_mark:|
|
|
80
|
-
|[lines_by_location()](#lines_by_location) |:white_check_mark:|:white_check_mark:|
|
|
81
|
-
|[locations_by_line()](#locations_by_line) |:x: |:x: |
|
|
82
|
-
|[coords()](#coords) |:x: |:x: |
|
|
83
|
-
|[geo_object()](#geo_object) |:x: |:x: |
|
|
84
|
-
|[trip_stop_time()](#trip_stop_time) |:x: |:x: |
|
|
85
|
-
|[stop_seq_coord()](#stop_seq_coord) |:x: |:x: |
|
|
86
|
-
|[map_route()](#map_route) |:x: |:x: |
|
|
87
|
-
|[add_info()](#add_info) |:x: |:x: |
|
|
88
|
-
|[stop_list()](#stop_list) |:x: |:x: |
|
|
89
|
-
|[line_list()](#line_list) |:x: |:x: |
|
|
90
|
-
|
|
91
|
-
## info()
|
|
92
|
-
Provides end API system information.
|
|
93
|
-
|
|
94
|
-
### Arguments
|
|
95
|
-
None
|
|
96
|
-
|
|
97
|
-
### Return value
|
|
98
|
-
|Type|Description|
|
|
99
|
-
|----|-----------|
|
|
100
|
-
|[SystemInfo](#systeminfo)|System information object|
|
|
101
|
-
|
|
102
|
-
### Example request
|
|
103
|
-
``` python
|
|
104
|
-
from apyefa import EfaClient, SystemInfo
|
|
105
|
-
from pprint import pprint
|
|
106
|
-
|
|
107
|
-
async with EfaClient("https://efa.vgn.de/vgnExt_oeffi/") as client:
|
|
108
|
-
info: SystemInfo = await client.info()
|
|
109
|
-
|
|
110
|
-
pprint(info)
|
|
111
|
-
|
|
112
|
-
# OUTPUT:
|
|
113
|
-
# SystemInfo(version='10.6.14.22',
|
|
114
|
-
# app_version='10.4.30.6 build 16.09.2024 01:30:57',
|
|
115
|
-
# data_format='EFA10_04_00',
|
|
116
|
-
# data_build='2024-12-02T16:53:02Z',
|
|
117
|
-
# valid_from=datetime.date(2024, 11, 1),
|
|
118
|
-
# valid_to=datetime.date(2025, 12, 13))
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
## locations_by_name()
|
|
122
|
-
Find localities by name or unique id.
|
|
123
|
-
|
|
124
|
-
### Arguments
|
|
125
|
-
|Name |Type |Required|Description|
|
|
126
|
-
|---------|--------------------|--------|-----------|
|
|
127
|
-
|name |str |required|Name or id ID of locality to search for|
|
|
128
|
-
|filters |list[[LocationFilter](#locationfilter)]|optional|The localition search may be limited by certain types of objects using this parameter. Default value is `[]`|
|
|
129
|
-
|limit |int |optional|Max size of returned list. Default value is `30`|
|
|
130
|
-
|
|
131
|
-
### Return value
|
|
132
|
-
|Type|Description|
|
|
133
|
-
|----|-----------|
|
|
134
|
-
|list[[Location](#location)]|List of locations found py provided name sorted by match quality|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
### Examples
|
|
138
|
-
1. Search for all localities contain name `Plärrer`
|
|
139
|
-
``` python
|
|
140
|
-
from apyefa import EfaClient, Location, LocationFilter
|
|
141
|
-
|
|
142
|
-
async with EfaClient("https://efa.vgn.de/vgnExt_oeffi/") as client:
|
|
143
|
-
locations: list[Location] = await client.locations_by_name("Plärrer")
|
|
144
|
-
|
|
145
|
-
print(f"Found {len(locations)} location(s)")
|
|
146
|
-
print(location[0].id)
|
|
147
|
-
print(location[0].name)
|
|
148
|
-
print(location[0].loc_type)
|
|
149
|
-
# OUTPUT:
|
|
150
|
-
# Found 20 location(s)
|
|
151
|
-
# de:09574:7132
|
|
152
|
-
# Hersbruck, Plärrer
|
|
153
|
-
# <LocationType.STOP: 'stop'>
|
|
154
|
-
```
|
|
155
|
-
2. Search for POIs and Addresses with name `Plärrer`
|
|
156
|
-
``` python
|
|
157
|
-
async with EfaClient("https://efa.vgn.de/vgnExt_oeffi/") as client:
|
|
158
|
-
locations: list[Location] = await client.locations_by_name("Plärrer", filters=[LocationFilter.ADDRESSES, LocationFilter.POIS])
|
|
159
|
-
|
|
160
|
-
print(f"Found {len(locations)} location(s)")
|
|
161
|
-
print(location[0].id)
|
|
162
|
-
print(location[0].name)
|
|
163
|
-
print(location[0].loc_type)
|
|
164
|
-
|
|
165
|
-
# OUTPUT:
|
|
166
|
-
# Found 4 location(s)
|
|
167
|
-
# poiID:1000029001:9564000:-1:N-PLärrer:Nürnberg:N-PLärrer:ANY:POI:4431934:680416:NAV4:vgn
|
|
168
|
-
# Nürnberg, N-PLärrer
|
|
169
|
-
# <LocationType.POI: 'poi'>
|
|
170
|
-
```
|
|
171
|
-
3. Search by `stop id`
|
|
172
|
-
``` python
|
|
173
|
-
async with EfaClient("https://efa.vgn.de/vgnExt_oeffi/") as client:
|
|
174
|
-
locations: list[Location] = await client.locations_by_name("de:09564:704")
|
|
175
|
-
|
|
176
|
-
print(f"Found {len(locations)} location(s)")
|
|
177
|
-
print(location[0].id)
|
|
178
|
-
print(location[0].name)
|
|
179
|
-
print(location[0].loc_type)
|
|
180
|
-
# OUTPUT:
|
|
181
|
-
# Found 1 location(s)
|
|
182
|
-
# de:09564:704
|
|
183
|
-
# Nürnberg, N-PLärrer
|
|
184
|
-
# <LocationType.STOP: 'stop'>
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
## locations_by_coord()
|
|
188
|
-
Find localities by their coordinates.
|
|
189
|
-
|
|
190
|
-
### Arguments
|
|
191
|
-
|Arguments|Type |Required|Description|
|
|
192
|
-
|---------|--------------------|--------|-----------|
|
|
193
|
-
|coord_x |float |required|X-coordinate|
|
|
194
|
-
|coord_y |float |required|Y-coordinate|
|
|
195
|
-
|format |[CoordFormat](#coordformat)|optional|Coordinates format used for request. Default to WGS84.|
|
|
196
|
-
|limit |int |optional|Max size of returned list. Default value is `10`|
|
|
197
|
-
|
|
198
|
-
### Return value
|
|
199
|
-
|Type|Description|
|
|
200
|
-
|----|-----------|
|
|
201
|
-
|list[[Location](#location)]|List of locations found py provided name sorted by match quality|
|
|
202
|
-
|
|
203
|
-
## trip()
|
|
204
|
-
|
|
205
|
-
## departures_by_location()
|
|
206
|
-
Find all departures for a specific location
|
|
207
|
-
|
|
208
|
-
### Arguments
|
|
209
|
-
|Arguments|Type |Required|Description|
|
|
210
|
-
|---------|--------------------|--------|-----------|
|
|
211
|
-
|stop |[Location](#location) \| str |required|Location for which the departures are being sought|
|
|
212
|
-
|limit |int |optional|Max size of returned list. Default value is `40`|
|
|
213
|
-
|date |str |optional|Date/time for which the departures are sought in format "YYYYMMDD hh:mm", "YYYYMMDD" or "mm:hh". Default value is `empty`|
|
|
214
|
-
|
|
215
|
-
### Return value
|
|
216
|
-
|Type|Description|
|
|
217
|
-
|----|-----------|
|
|
218
|
-
|list[[Departure](#departure)]|List of departures sorted by departure time|
|
|
219
|
-
|
|
220
|
-
### Examples
|
|
221
|
-
``` python
|
|
222
|
-
from apyefa import EfaClient, Departure
|
|
223
|
-
|
|
224
|
-
async with EfaClient("https://efa.vgn.de/vgnExt_oeffi/") as client:
|
|
225
|
-
departures: list[Departure] = await client.departures_by_location("de:09564:704", limit=3, date="22:13")
|
|
226
|
-
|
|
227
|
-
print(f"Found {len(departures)} departure(s)")
|
|
228
|
-
print(location[0].line_name)
|
|
229
|
-
print(location[0].route)
|
|
230
|
-
print(location[0].transport)
|
|
231
|
-
print(location[0].planned_time)
|
|
232
|
-
# OUTPUT:
|
|
233
|
-
# Found 3 departure(s)
|
|
234
|
-
# U3
|
|
235
|
-
# Nordwestring - Hauptbahnhof - Plärrer - Großreuth bei Schweinau
|
|
236
|
-
# <TransportType.SUBWAY: 2>
|
|
237
|
-
# datetime.datetime(2024, 12, 7, 22, 16, tzinfo=zoneinfo.ZoneInfo(key='Europe/Berlin'))
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
## lines_by_name()
|
|
241
|
-
Find lines by name.
|
|
242
|
-
|
|
243
|
-
### Arguments
|
|
244
|
-
|Arguments|Type |Required|Description|
|
|
245
|
-
|---------|--------------------|--------|-----------|
|
|
246
|
-
|name |str |required|Name of the line to search. e.g. `U1` or `67`|
|
|
247
|
-
|
|
248
|
-
### Return value
|
|
249
|
-
|Type|Description|
|
|
250
|
-
|----|-----------|
|
|
251
|
-
|list[[Line](#line)]|List of lines found for provided name|
|
|
252
|
-
|
|
253
|
-
> NOTE: The attribute `origin` of returned `line` objects is None
|
|
254
|
-
|
|
255
|
-
### Examples
|
|
256
|
-
``` python
|
|
257
|
-
async with EfaClient("https://efa.vgn.de/vgnExt_oeffi/") as client:
|
|
258
|
-
lines: list[Line] = await client.lines_by_name("U1")
|
|
259
|
-
|
|
260
|
-
print(f"Found {len(lines)} line(s)")
|
|
261
|
-
print(f"id : {lines[0].id}")
|
|
262
|
-
print(f"name : {lines[0].name}")
|
|
263
|
-
print(f"description: {lines[0].description}")
|
|
264
|
-
print(f"product : {lines[0].product}")
|
|
265
|
-
|
|
266
|
-
# OUTPUT:
|
|
267
|
-
# Found 4 line(s)
|
|
268
|
-
# id : vgn:11001: :H:j24
|
|
269
|
-
# name : U1
|
|
270
|
-
# description: Fürth Hardhöhe - Nürnberg Plärrer - Hauptbahnhof - Langwasser Süd
|
|
271
|
-
# product : <TransportType.SUBWAY: 2>
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
## lines_by_location()
|
|
275
|
-
Find lines pass provided location.
|
|
276
|
-
|
|
277
|
-
### Arguments
|
|
278
|
-
|Arguments|Type |Required|Description|
|
|
279
|
-
|---------|--------------------|--------|-----------|
|
|
280
|
-
|location |str \| [Location](#location) |required|The location passed by searched line(s)|
|
|
281
|
-
|req_types|list[[LineRequestType](#lineRequestType)]|optional|The result presentation type(s) can be defined with this argument. Default value is `[]`
|
|
282
|
-
|
|
283
|
-
### Return value
|
|
284
|
-
|Type|Description|
|
|
285
|
-
|----|-----------|
|
|
286
|
-
|list[[Line](#line)]|List of lines found for provided location|
|
|
287
|
-
|
|
288
|
-
### Examples
|
|
289
|
-
``` python
|
|
290
|
-
async with EfaClient("https://efa.vgn.de/vgnExt_oeffi/") as client:
|
|
291
|
-
lines: list[Line] = await client.lines_by_location("de:09564:704")
|
|
292
|
-
|
|
293
|
-
print(f"Found {len(lines)} line(s)")
|
|
294
|
-
print(f"id : {lines[0].id}")
|
|
295
|
-
print(f"name : {lines[0].name}")
|
|
296
|
-
print(f"description: {lines[0].description}")
|
|
297
|
-
print(f"product : {lines[0].product}")
|
|
298
|
-
|
|
299
|
-
# OUTPUT:
|
|
300
|
-
# Found 10 line(s)
|
|
301
|
-
# id : vgn:33283: :H:j24
|
|
302
|
-
# name : 283
|
|
303
|
-
# description: Hugenottenplatz - St. Johann - Dechsendorfer Weiher
|
|
304
|
-
# product : <TransportType.BUS: 5>
|
|
305
|
-
```
|
|
306
|
-
|
|
307
|
-
## coords()
|
|
308
|
-
## geo_object()
|
|
309
|
-
## trip_stop_time()
|
|
310
|
-
## stop_seq_coord()
|
|
311
|
-
## map_route()
|
|
312
|
-
## add_info()
|
|
313
|
-
## stop_list()
|
|
314
|
-
## line_list()
|
|
315
|
-
|
|
316
|
-
# Data Classes
|
|
317
|
-
## SystemInfo
|
|
318
|
-
|Attribute |Type|Description |
|
|
319
|
-
|------------|----|------------------------ |
|
|
320
|
-
|version |str |API internal information|
|
|
321
|
-
|app_version |str |API internal information |
|
|
322
|
-
|data_format |str |API internal information |
|
|
323
|
-
|data_build |str |API internal information |
|
|
324
|
-
|valid_from |date|Start validity date |
|
|
325
|
-
|valid_to |date|End validity date |
|
|
326
|
-
|
|
327
|
-
## Location
|
|
328
|
-
|Attribute |Type |Description |
|
|
329
|
-
|-----------------|-------------------|-------------|
|
|
330
|
-
|name |str |Name of location e.g. `Nürnberg, Nordostbahnhof`|
|
|
331
|
-
|loc_type |[LocationType](#locationtype)|Type of location e.g. `STOP` or `POI`|
|
|
332
|
-
|id |str |Location unique id|
|
|
333
|
-
|coord |list[int] |Location coordinates|
|
|
334
|
-
|transports |list[[TransportType](#transporttype)]|Transport type(s) this location pass|
|
|
335
|
-
|parent |[Location](#location) \| None|Parent location|
|
|
336
|
-
|stops |list[[Location](#location)]|Location with type `STOP` assigned to this location|
|
|
337
|
-
|properties |dict |API internal information|
|
|
338
|
-
|
|
339
|
-
## Departure
|
|
340
|
-
|Attribute |Type|Description |
|
|
341
|
-
|---------------|----|------------------------|
|
|
342
|
-
|location |[Location](#location) |Location of departure|
|
|
343
|
-
|line_name |str |Line name e.g. `U3`|
|
|
344
|
-
|route |str |The complete route name from origin to destination stops e.g. `Nordwestring - Hauptbahnhof - Plärrer - Großreuth bei Schweinau`|
|
|
345
|
-
|origin |[Location](#location)|Origin location|
|
|
346
|
-
|destination |[Location](#location)|Destination location|
|
|
347
|
-
|transport |[TransportType](#transporttype)|Transport type e.g. `Bus` or `Subway`|
|
|
348
|
-
|planned_time |datetime|Planned departure time|
|
|
349
|
-
|estimated_time |datetime \| None|Estimated departure time(will be provided by endpoits supporting real time mode)|
|
|
350
|
-
|infos |list[dict] \| None|List of ICS messages|
|
|
351
|
-
|
|
352
|
-
## Line
|
|
353
|
-
|Attribute |Type|Description |
|
|
354
|
-
|------------|----|------------------------ |
|
|
355
|
-
|id |str |Line id |
|
|
356
|
-
|name |str |Line name |
|
|
357
|
-
|description |str |Route name |
|
|
358
|
-
|product |[TransportType](#transporttype) |Type of transportation. Bus, Subway etc.|
|
|
359
|
-
|destination |[Location](#location)|Line destination location|
|
|
360
|
-
|origin |[Location](#location) \| None|Line start location|
|
|
361
|
-
|properties |dict|Additional properties |
|
|
362
|
-
|
|
363
|
-
# Enums
|
|
364
|
-
## TransportType
|
|
365
|
-
```python
|
|
366
|
-
class TransportType(IntEnum):
|
|
367
|
-
TRAIN = 0 # Zug
|
|
368
|
-
SUBURBAN = 1 # S-Bahn
|
|
369
|
-
SUBWAY = 2 # U-Bahn
|
|
370
|
-
CITY_RAIL = 3 # Stadtbahn
|
|
371
|
-
TRAM = 4 # Straßenbahn
|
|
372
|
-
CITY_BUS = 5 # Stadtbus
|
|
373
|
-
REGIONAL_BUS = 6 # Regionalbus
|
|
374
|
-
EXPRESS_BUS = 7 # Schnellbus
|
|
375
|
-
CABLE_RAIL = 8 # Seilbahn
|
|
376
|
-
FERRY = 9 # Schief
|
|
377
|
-
AST = 10 # Anruf-Sammel-Taxi
|
|
378
|
-
SUSPENSION_RAIL = 11 # Schwebebahn
|
|
379
|
-
AIRPLANE = 12 # Flugzeug
|
|
380
|
-
REGIONAL_TRAIN = 13 # Reginalzug (z.B. IRE, RE und RB)
|
|
381
|
-
NATIONAL_TRAIN = 14 # Nationaler Zug (z.B. IR und D)
|
|
382
|
-
INTERNATINAL_TRAIN = 15 # Internationaler Zug (z.B. IC und EC)
|
|
383
|
-
HIGH_SPEED_TRAIN = 16 # Hochgeschwindigkeitzüge (z.B. ICE)
|
|
384
|
-
RAIL_REPLACEMENT_TRANSPORT = 17 # Schienenersatzverkehr
|
|
385
|
-
SHUTTLE_TRAIN = 18 # Schuttlezug
|
|
386
|
-
CITIZEN_BUS = 19 # Bürgerbus
|
|
387
|
-
```
|
|
388
|
-
|
|
389
|
-
## LineRequestType
|
|
390
|
-
```python
|
|
391
|
-
class LineRequestType(IntEnum):
|
|
392
|
-
NONE = 0
|
|
393
|
-
DEPARTURE_MONITOR = 1
|
|
394
|
-
STOP_TIMETABLE = 2
|
|
395
|
-
TIMETABLE = 4
|
|
396
|
-
ROUTE_MAPS = 8
|
|
397
|
-
STATION_TIMETABLE = 16
|
|
398
|
-
```
|
|
399
|
-
|
|
400
|
-
## CoordFormat
|
|
401
|
-
```python
|
|
402
|
-
class CoordFormat(StrEnum):
|
|
403
|
-
WGS84 = "WGS84 [dd.ddddd]"
|
|
404
|
-
```
|
|
405
|
-
|
|
406
|
-
## LocationFilter
|
|
407
|
-
```python
|
|
408
|
-
class LocationFilter(IntEnum):
|
|
409
|
-
NO_FILTER = 0
|
|
410
|
-
LOCATIONS = 1
|
|
411
|
-
STOPS = 2
|
|
412
|
-
STREETS = 4
|
|
413
|
-
ADDRESSES = 8
|
|
414
|
-
INTERSACTIONS = 16
|
|
415
|
-
POIS = 32
|
|
416
|
-
POST_CODES = 64
|
|
417
|
-
```
|
|
418
|
-
|
|
419
|
-
## LocationType
|
|
420
|
-
```python
|
|
421
|
-
class LocationType(StrEnum):
|
|
422
|
-
STOP = "stop"
|
|
423
|
-
POI = "poi"
|
|
424
|
-
ADDRESS = "address"
|
|
425
|
-
STREET = "street"
|
|
426
|
-
LOCALITY = "locality"
|
|
427
|
-
SUBURB = "suburb"
|
|
428
|
-
PLATFORM = "platform"
|
|
429
|
-
UNKNOWN = "unknown"
|
|
430
|
-
```
|
apyefa-0.0.6.dist-info/RECORD
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
apyefa/__init__.py,sha256=9LuZCm4L02Jz-rgvSyTSQ10fzMEZ0P2nWQQ6m3Z9Ab0,386
|
|
2
|
-
apyefa/client.py,sha256=OP9HnzwufH9joS-Bx7r768yu185ILbpVFGuYV2APjQ0,6832
|
|
3
|
-
apyefa/data_classes.py,sha256=Njt7r8ONEY5KxUz9uVFnPHU9qz9sp5RWmmhiR8ywDiY,11552
|
|
4
|
-
apyefa/exceptions.py,sha256=Vhc8FEtI1xSxbVRLFXd3BlNTekY2w3byEvd3Jhhg8h4,240
|
|
5
|
-
apyefa/helpers.py,sha256=EJyj-Pw3xDrn8WKGbpfqbnaUZjHtVrE2A2LYpTkACps,1695
|
|
6
|
-
apyefa/commands/__init__.py,sha256=kC7Zr8IcahAN8xEOytDUS6WCADQ5oe_nqDIPAjlzxy4,425
|
|
7
|
-
apyefa/commands/command.py,sha256=ruVb8kpvsShsfT4wrgwcCdxqlGnYs4jsXTEoYx873rk,3633
|
|
8
|
-
apyefa/commands/command_departures.py,sha256=kYt6GbXD1XYXEbGpi61TEFBTznqShyOaqJmpRi0mHZ4,1811
|
|
9
|
-
apyefa/commands/command_serving_lines.py,sha256=PSWjr0el4bhq20IaW_P56q8sJ3vNlfV-KpoAUjrsHqo,2212
|
|
10
|
-
apyefa/commands/command_stop_finder.py,sha256=lUkubSe7mVu8M6rss-RumnCPOaJJo_v6qlRNF7n6R88,2019
|
|
11
|
-
apyefa/commands/command_system_info.py,sha256=rhAoeOE8V9Wc3G6z7NDrB9pjcULDz1o7oo-idS4VyXQ,858
|
|
12
|
-
apyefa/commands/command_trip.py,sha256=Mhqv7wR11DtvxfaZSmNF-hLZxgC3XFH3UgBuI2fFEBA,1197
|
|
13
|
-
apyefa/commands/parsers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
-
apyefa/commands/parsers/parser.py,sha256=1PSlLpfYrNeKRTpvCcYsCzAKlNrs0oHvSN7zpF4Xcs8,140
|
|
15
|
-
apyefa/commands/parsers/rapid_json_parser.py,sha256=UMexRiMKkJLcK5EEj80B6RYkWBuR8ZWD3YpeGa0J3lQ,212
|
|
16
|
-
apyefa/commands/parsers/xml_parser.py,sha256=ru52QtBP68KoTZ8OgjFWrLy-PD4_j1miY8Zv5umNSE8,151
|
|
17
|
-
apyefa-0.0.6.dist-info/LICENSE,sha256=C2Gdvb1B39BeEP-RGqVd7w6j94GnJo4gnYyiC_l3SFQ,1066
|
|
18
|
-
apyefa-0.0.6.dist-info/METADATA,sha256=K0jaxYWYGc9Y3QkAQsdojOyLHWGUM9gBusllwQjbm6Y,16701
|
|
19
|
-
apyefa-0.0.6.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
20
|
-
apyefa-0.0.6.dist-info/top_level.txt,sha256=b9VSv2S7lxdaypCumxO92IEQFpJdFuB8vQs03j5gZxY,7
|
|
21
|
-
apyefa-0.0.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|