apyefa 1.0.1__tar.gz → 1.1.0__tar.gz

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.

Files changed (61) hide show
  1. {apyefa-1.0.1 → apyefa-1.1.0}/PKG-INFO +4 -4
  2. {apyefa-1.0.1 → apyefa-1.1.0}/README.md +2 -2
  3. {apyefa-1.0.1 → apyefa-1.1.0}/apyefa/client.py +6 -6
  4. {apyefa-1.0.1 → apyefa-1.1.0}/apyefa/data_classes.py +10 -5
  5. {apyefa-1.0.1 → apyefa-1.1.0}/apyefa.egg-info/PKG-INFO +4 -4
  6. {apyefa-1.0.1 → apyefa-1.1.0}/pyproject.toml +1 -1
  7. {apyefa-1.0.1 → apyefa-1.1.0}/tests/unit/test_client.py +4 -4
  8. {apyefa-1.0.1 → apyefa-1.1.0}/.github/labeler.yml +0 -0
  9. {apyefa-1.0.1 → apyefa-1.1.0}/.github/release-drafter.yml +0 -0
  10. {apyefa-1.0.1 → apyefa-1.1.0}/.github/workflows/labeler.yml +0 -0
  11. {apyefa-1.0.1 → apyefa-1.1.0}/.github/workflows/python-package.yml +0 -0
  12. {apyefa-1.0.1 → apyefa-1.1.0}/.github/workflows/release_drafter.yml +0 -0
  13. {apyefa-1.0.1 → apyefa-1.1.0}/.gitignore +0 -0
  14. {apyefa-1.0.1 → apyefa-1.1.0}/.vscode/settings.json +0 -0
  15. {apyefa-1.0.1 → apyefa-1.1.0}/LICENSE +0 -0
  16. {apyefa-1.0.1 → apyefa-1.1.0}/apyefa/__init__.py +0 -0
  17. {apyefa-1.0.1 → apyefa-1.1.0}/apyefa/commands/__init__.py +0 -0
  18. {apyefa-1.0.1 → apyefa-1.1.0}/apyefa/commands/command.py +0 -0
  19. {apyefa-1.0.1 → apyefa-1.1.0}/apyefa/commands/command_add_info.py +0 -0
  20. {apyefa-1.0.1 → apyefa-1.1.0}/apyefa/commands/command_coord.py +0 -0
  21. {apyefa-1.0.1 → apyefa-1.1.0}/apyefa/commands/command_departures.py +0 -0
  22. {apyefa-1.0.1 → apyefa-1.1.0}/apyefa/commands/command_geoobject.py +0 -0
  23. {apyefa-1.0.1 → apyefa-1.1.0}/apyefa/commands/command_line_list.py +0 -0
  24. {apyefa-1.0.1 → apyefa-1.1.0}/apyefa/commands/command_line_stop.py +0 -0
  25. {apyefa-1.0.1 → apyefa-1.1.0}/apyefa/commands/command_serving_lines.py +0 -0
  26. {apyefa-1.0.1 → apyefa-1.1.0}/apyefa/commands/command_stop_finder.py +0 -0
  27. {apyefa-1.0.1 → apyefa-1.1.0}/apyefa/commands/command_stop_list.py +0 -0
  28. {apyefa-1.0.1 → apyefa-1.1.0}/apyefa/commands/command_system_info.py +0 -0
  29. {apyefa-1.0.1 → apyefa-1.1.0}/apyefa/commands/command_trip.py +0 -0
  30. {apyefa-1.0.1 → apyefa-1.1.0}/apyefa/commands/parsers/__init__.py +0 -0
  31. {apyefa-1.0.1 → apyefa-1.1.0}/apyefa/commands/parsers/parser.py +0 -0
  32. {apyefa-1.0.1 → apyefa-1.1.0}/apyefa/commands/parsers/rapid_json_parser.py +0 -0
  33. {apyefa-1.0.1 → apyefa-1.1.0}/apyefa/commands/parsers/xml_parser.py +0 -0
  34. {apyefa-1.0.1 → apyefa-1.1.0}/apyefa/exceptions.py +0 -0
  35. {apyefa-1.0.1 → apyefa-1.1.0}/apyefa/helpers.py +0 -0
  36. {apyefa-1.0.1 → apyefa-1.1.0}/apyefa.egg-info/SOURCES.txt +0 -0
  37. {apyefa-1.0.1 → apyefa-1.1.0}/apyefa.egg-info/dependency_links.txt +0 -0
  38. {apyefa-1.0.1 → apyefa-1.1.0}/apyefa.egg-info/requires.txt +0 -0
  39. {apyefa-1.0.1 → apyefa-1.1.0}/apyefa.egg-info/top_level.txt +0 -0
  40. {apyefa-1.0.1 → apyefa-1.1.0}/examples.py +0 -0
  41. {apyefa-1.0.1 → apyefa-1.1.0}/setup.cfg +0 -0
  42. {apyefa-1.0.1 → apyefa-1.1.0}/tests/conftest.py +0 -0
  43. {apyefa-1.0.1 → apyefa-1.1.0}/tests/integration/test_endpoints.py +0 -0
  44. {apyefa-1.0.1 → apyefa-1.1.0}/tests/unit/commands/__init__.py +0 -0
  45. {apyefa-1.0.1 → apyefa-1.1.0}/tests/unit/commands/parsers/__init__.py +0 -0
  46. {apyefa-1.0.1 → apyefa-1.1.0}/tests/unit/commands/parsers/test_json_parser.py +0 -0
  47. {apyefa-1.0.1 → apyefa-1.1.0}/tests/unit/commands/parsers/test_xml_parser.py +0 -0
  48. {apyefa-1.0.1 → apyefa-1.1.0}/tests/unit/commands/test_cmd.py +0 -0
  49. {apyefa-1.0.1 → apyefa-1.1.0}/tests/unit/commands/test_cmd_departures.py +0 -0
  50. {apyefa-1.0.1 → apyefa-1.1.0}/tests/unit/commands/test_cmd_line_list.py +0 -0
  51. {apyefa-1.0.1 → apyefa-1.1.0}/tests/unit/commands/test_cmd_line_stop.py +0 -0
  52. {apyefa-1.0.1 → apyefa-1.1.0}/tests/unit/commands/test_cmd_serving_lines.py +0 -0
  53. {apyefa-1.0.1 → apyefa-1.1.0}/tests/unit/commands/test_cmd_stop_finder.py +0 -0
  54. {apyefa-1.0.1 → apyefa-1.1.0}/tests/unit/commands/test_cmd_stop_list.py +0 -0
  55. {apyefa-1.0.1 → apyefa-1.1.0}/tests/unit/commands/test_cmd_system_info.py +0 -0
  56. {apyefa-1.0.1 → apyefa-1.1.0}/tests/unit/data_classes/__init__.py +0 -0
  57. {apyefa-1.0.1 → apyefa-1.1.0}/tests/unit/data_classes/test_departure.py +0 -0
  58. {apyefa-1.0.1 → apyefa-1.1.0}/tests/unit/data_classes/test_location.py +0 -0
  59. {apyefa-1.0.1 → apyefa-1.1.0}/tests/unit/data_classes/test_system_info.py +0 -0
  60. {apyefa-1.0.1 → apyefa-1.1.0}/tests/unit/data_classes/test_transportation.py +0 -0
  61. {apyefa-1.0.1 → apyefa-1.1.0}/tests/unit/test_helpers.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: apyefa
3
- Version: 1.0.1
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
@@ -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|
@@ -34,8 +34,8 @@ pip install .
34
34
  |Function Name |Description|
35
35
  |----------------------------------------------------|-----------|
36
36
  |[info()](https://github.com/alex-jung/apyefa/wiki/info)|Provides EFA endpoint system information|
37
- |[locations_by_name()](https://github.com/alex-jung/apyefa/wiki/locations_by_name)|Search for locations by name with optional filters and limits|
38
- |[location_by_coord()](https://github.com/alex-jung/apyefa/wiki/location_by_coord)|Search for location by it's coordinates|
37
+ |[locations_by_name()](https://github.com/alex-jung/apyefa/wiki/locations_by_name)|Search for locations by name with optional filters|
38
+ |[locations_by_coord()](https://github.com/alex-jung/apyefa/wiki/locations_by_coord)|Search for locations by coordinates|
39
39
  |[list_lines()](https://github.com/alex-jung/apyefa/wiki/list_lines)|Retrieves a list of lines|
40
40
  |[list_stops()](https://github.com/alex-jung/apyefa/wiki/list_stops)|Retrieves a list of stops|
41
41
  |[trip()](https://github.com/alex-jung/apyefa/wiki/trip)|Calculates a trip between an origin and a destination locations|
@@ -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}")
@@ -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.1
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
@@ -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|
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
7
7
 
8
8
  [project]
9
9
  name = "apyefa"
10
- version = "1.0.1"
10
+ version = "1.1.0"
11
11
  requires-python = ">= 3.11"
12
12
  description = "Python API for EFA(Elektronische Fahrplanauskunft) async requests"
13
13
  authors = [
@@ -138,7 +138,7 @@ class TestFunctionLocationsByCoord:
138
138
  return_value=True,
139
139
  ):
140
140
 
141
- await test_async_client.location_by_coord(x, y)
141
+ await test_async_client.locations_by_coord(x, y)
142
142
 
143
143
  mock_add_param.assert_any_call("outputFormat", "rapidJSON")
144
144
  mock_add_param.assert_any_call("locationServerActive", 1)
@@ -154,7 +154,7 @@ class TestFunctionLocationsByCoord:
154
154
  ) as mock_parse:
155
155
  mock_parse.return_value = [x for x in range(limit * 2)]
156
156
 
157
- result = await test_async_client.location_by_coord(0, 0, limit=limit)
157
+ result = await test_async_client.locations_by_coord(0, 0, limit=limit)
158
158
 
159
159
  assert len(result) == limit
160
160
 
@@ -172,7 +172,7 @@ class TestFunctionLocationsByCoord:
172
172
  return_value=True,
173
173
  ):
174
174
 
175
- await test_async_client.location_by_coord(0, 0, format=format)
175
+ await test_async_client.locations_by_coord(0, 0, format=format)
176
176
 
177
177
  mock_add_param.assert_any_call("name_sf", f"0:0:{format}")
178
178
 
@@ -189,7 +189,7 @@ class TestFunctionLocationsByCoord:
189
189
  return_value=True,
190
190
  ):
191
191
 
192
- await test_async_client.location_by_coord(
192
+ await test_async_client.locations_by_coord(
193
193
  0, 0, search_nearbly_stops=search_nearbly_stops
194
194
  )
195
195
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes