apyefa 1.0.0__py3-none-any.whl → 1.1.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 CHANGED
@@ -130,17 +130,17 @@ class EfaClient:
130
130
 
131
131
  return command.parse(response)[:limit]
132
132
 
133
- async def location_by_coord(
133
+ async def locations_by_coord(
134
134
  self,
135
135
  coord_x: float,
136
136
  coord_y: float,
137
137
  *,
138
138
  format: CoordFormat = CoordFormat.WGS84,
139
- limit: int = 10,
140
139
  search_nearbly_stops: bool = False,
141
- ) -> Location:
140
+ limit: int = 10,
141
+ ) -> list[Location]:
142
142
  """
143
- Asynchronously fetches location information based on given coordinates.
143
+ Asynchronously fetches locations based on given coordinates.
144
144
 
145
145
  Args:
146
146
  coord_x (float): The X coordinate (longitude).
@@ -150,9 +150,9 @@ class EfaClient:
150
150
  search_nearbly_stops (bool, optional): Whether to search for nearby stops. Defaults to False.
151
151
 
152
152
  Returns:
153
- Location: The location information based on the provided coordinates.
153
+ list[Location]: List of locations found based on the provided coordinates.
154
154
  """
155
- _LOGGER.info("Request location search by coordinates")
155
+ _LOGGER.info("Request locations search by coordinates")
156
156
  _LOGGER.debug(f"coord_x: {coord_x}")
157
157
  _LOGGER.debug(f"coord_y: {coord_y}")
158
158
  _LOGGER.debug(f"format: {format}")
apyefa/data_classes.py CHANGED
@@ -122,7 +122,8 @@ _SCHEMA_PRODUCT = vol.Schema(
122
122
  vol.Optional("id"): int,
123
123
  vol.Optional("name"): str,
124
124
  vol.Optional("iconId"): int,
125
- }
125
+ },
126
+ extra=vol.ALLOW_EXTRA,
126
127
  )
127
128
 
128
129
  _SCHEMA_PARENT = vol.Schema(
@@ -136,7 +137,8 @@ _SCHEMA_PARENT = vol.Schema(
136
137
  vol.Optional("disassembledName"): str,
137
138
  vol.Optional("parent"): vol.Self,
138
139
  vol.Optional("properties"): _SCHEMA_PROPERTIES,
139
- }
140
+ },
141
+ extra=vol.ALLOW_EXTRA,
140
142
  )
141
143
 
142
144
  _SCHEMA_OPERATOR = vol.Schema(
@@ -144,7 +146,8 @@ _SCHEMA_OPERATOR = vol.Schema(
144
146
  vol.Required("id"): str,
145
147
  vol.Required("name"): str,
146
148
  vol.Optional("code"): str,
147
- }
149
+ },
150
+ extra=vol.ALLOW_EXTRA,
148
151
  )
149
152
 
150
153
  _SCHEMA_LOCATION: Final = vol.Schema(
@@ -201,7 +204,8 @@ _SCHEMA_SYSTEM_INFO: Final = vol.Schema(
201
204
  vol.Required("to"): vol.Date("%Y-%m-%d"),
202
205
  }
203
206
  ),
204
- }
207
+ },
208
+ extra=vol.ALLOW_EXTRA,
205
209
  )
206
210
 
207
211
  _SCHEMA_DEPARTURE: Final = vol.Schema(
@@ -240,7 +244,8 @@ _SCHEMA_LEG: Final = vol.Schema(
240
244
  vol.Optional("isRealtimeControlled"): vol.Boolean,
241
245
  vol.Optional("realtimeStatus"): list,
242
246
  vol.Optional("footPathInfo"): list,
243
- }
247
+ },
248
+ extra=vol.ALLOW_EXTRA,
244
249
  )
245
250
 
246
251
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: apyefa
3
- Version: 1.0.0
3
+ Version: 1.1.0
4
4
  Summary: Python API for EFA(Elektronische Fahrplanauskunft) async requests
5
5
  Author-email: Alex Jung <jungdevelop@gmail.com>
6
6
  License: MIT License
@@ -32,7 +32,7 @@ Keywords: efa,public transport,traffic
32
32
  Requires-Python: >=3.11
33
33
  Description-Content-Type: text/markdown
34
34
  License-File: LICENSE
35
- Requires-Dist: aiohttp>=3.11.7
35
+ Requires-Dist: aiohttp>=3.11.2
36
36
  Requires-Dist: voluptuous>=0.15.2
37
37
  Requires-Dist: tzdata>=2024.2
38
38
  Provides-Extra: tests
@@ -79,8 +79,8 @@ pip install .
79
79
  |Function Name |Description|
80
80
  |----------------------------------------------------|-----------|
81
81
  |[info()](https://github.com/alex-jung/apyefa/wiki/info)|Provides EFA endpoint system information|
82
- |[locations_by_name()](https://github.com/alex-jung/apyefa/wiki/locations_by_name)|Search for locations by name with optional filters and limits|
83
- |[location_by_coord()](https://github.com/alex-jung/apyefa/wiki/location_by_coord)|Search for location by it's coordinates|
82
+ |[locations_by_name()](https://github.com/alex-jung/apyefa/wiki/locations_by_name)|Search for locations by name with optional filters|
83
+ |[locations_by_coord()](https://github.com/alex-jung/apyefa/wiki/locations_by_coord)|Search for locations by coordinates|
84
84
  |[list_lines()](https://github.com/alex-jung/apyefa/wiki/list_lines)|Retrieves a list of lines|
85
85
  |[list_stops()](https://github.com/alex-jung/apyefa/wiki/list_stops)|Retrieves a list of stops|
86
86
  |[trip()](https://github.com/alex-jung/apyefa/wiki/trip)|Calculates a trip between an origin and a destination locations|
@@ -1,6 +1,6 @@
1
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
2
+ apyefa/client.py,sha256=CEwWuHFBTUfgGszQVXAogWUQ-JY-Ew7zMidB7oR2AD0,27228
3
+ apyefa/data_classes.py,sha256=IiLdMV6Jsorp_oaZjez2EvL7PydV0xIIBedpJ9rPFQk,15108
4
4
  apyefa/exceptions.py,sha256=Vhc8FEtI1xSxbVRLFXd3BlNTekY2w3byEvd3Jhhg8h4,240
5
5
  apyefa/helpers.py,sha256=WGXQ2SwlQ5IB57_ab0ry3QAqL-iDWqtOOwP0yhQI5ck,3531
6
6
  apyefa/commands/__init__.py,sha256=h5cyzFXA6vJQgUx7LyngoXxXo11ULvVku9GFuVwvkic,848
@@ -20,8 +20,8 @@ apyefa/commands/parsers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
20
20
  apyefa/commands/parsers/parser.py,sha256=1PSlLpfYrNeKRTpvCcYsCzAKlNrs0oHvSN7zpF4Xcs8,140
21
21
  apyefa/commands/parsers/rapid_json_parser.py,sha256=UMexRiMKkJLcK5EEj80B6RYkWBuR8ZWD3YpeGa0J3lQ,212
22
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,,
23
+ apyefa-1.1.0.dist-info/LICENSE,sha256=C2Gdvb1B39BeEP-RGqVd7w6j94GnJo4gnYyiC_l3SFQ,1066
24
+ apyefa-1.1.0.dist-info/METADATA,sha256=lIgUJrtlAIixd8kgfq8SA4hm2naHlXFUh02kLD3qfos,6100
25
+ apyefa-1.1.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
26
+ apyefa-1.1.0.dist-info/top_level.txt,sha256=b9VSv2S7lxdaypCumxO92IEQFpJdFuB8vQs03j5gZxY,7
27
+ apyefa-1.1.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.6.0)
2
+ Generator: setuptools (75.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5