vessel-api-python 1.0.0__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.
- {vessel_api_python-1.0.0 → vessel_api_python-1.1.0}/Makefile +1 -1
- {vessel_api_python-1.0.0 → vessel_api_python-1.1.0}/PKG-INFO +3 -3
- {vessel_api_python-1.0.0 → vessel_api_python-1.1.0}/README.md +1 -1
- {vessel_api_python-1.0.0 → vessel_api_python-1.1.0}/pyproject.toml +2 -2
- {vessel_api_python-1.0.0 → vessel_api_python-1.1.0}/src/vessel_api_python/_constants.py +1 -1
- {vessel_api_python-1.0.0 → vessel_api_python-1.1.0}/src/vessel_api_python/_services.py +123 -112
- {vessel_api_python-1.0.0 → vessel_api_python-1.1.0}/.github/workflows/ci.yml +0 -0
- {vessel_api_python-1.0.0 → vessel_api_python-1.1.0}/.github/workflows/publish.yml +0 -0
- {vessel_api_python-1.0.0 → vessel_api_python-1.1.0}/.gitignore +0 -0
- {vessel_api_python-1.0.0 → vessel_api_python-1.1.0}/LICENSE +0 -0
- {vessel_api_python-1.0.0 → vessel_api_python-1.1.0}/SECURITY.md +0 -0
- {vessel_api_python-1.0.0 → vessel_api_python-1.1.0}/examples/async_basic.py +0 -0
- {vessel_api_python-1.0.0 → vessel_api_python-1.1.0}/examples/basic.py +0 -0
- {vessel_api_python-1.0.0 → vessel_api_python-1.1.0}/openapi/swagger.json +0 -0
- {vessel_api_python-1.0.0 → vessel_api_python-1.1.0}/src/vessel_api_python/__init__.py +0 -0
- {vessel_api_python-1.0.0 → vessel_api_python-1.1.0}/src/vessel_api_python/_client.py +0 -0
- {vessel_api_python-1.0.0 → vessel_api_python-1.1.0}/src/vessel_api_python/_errors.py +0 -0
- {vessel_api_python-1.0.0 → vessel_api_python-1.1.0}/src/vessel_api_python/_iterator.py +0 -0
- {vessel_api_python-1.0.0 → vessel_api_python-1.1.0}/src/vessel_api_python/_models.py +0 -0
- {vessel_api_python-1.0.0 → vessel_api_python-1.1.0}/src/vessel_api_python/_transport.py +0 -0
- {vessel_api_python-1.0.0 → vessel_api_python-1.1.0}/src/vessel_api_python/py.typed +0 -0
- {vessel_api_python-1.0.0 → vessel_api_python-1.1.0}/tests/__init__.py +0 -0
- {vessel_api_python-1.0.0 → vessel_api_python-1.1.0}/tests/conftest.py +0 -0
- {vessel_api_python-1.0.0 → vessel_api_python-1.1.0}/tests/test_client.py +0 -0
- {vessel_api_python-1.0.0 → vessel_api_python-1.1.0}/tests/test_errors.py +0 -0
- {vessel_api_python-1.0.0 → vessel_api_python-1.1.0}/tests/test_iterator.py +0 -0
- {vessel_api_python-1.0.0 → vessel_api_python-1.1.0}/tests/test_services.py +0 -0
- {vessel_api_python-1.0.0 → vessel_api_python-1.1.0}/tests/test_smoke.py +0 -0
- {vessel_api_python-1.0.0 → vessel_api_python-1.1.0}/tests/test_transport.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: vessel-api-python
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.1.0
|
|
4
4
|
Summary: Python client for the Vessel Tracking API — maritime vessel tracking, port events, emissions, and navigation data.
|
|
5
5
|
Project-URL: Documentation, https://vesselapi.com/docs
|
|
6
6
|
Project-URL: Repository, https://github.com/vessel-api/vesselapi-python
|
|
@@ -10,7 +10,7 @@ Author-email: Vessel API <support@vesselapi.com>
|
|
|
10
10
|
License-Expression: MIT
|
|
11
11
|
License-File: LICENSE
|
|
12
12
|
Keywords: ais,maritime,sdk,tracking,vessel,vesselapi
|
|
13
|
-
Classifier: Development Status ::
|
|
13
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
14
14
|
Classifier: Intended Audience :: Developers
|
|
15
15
|
Classifier: License :: OSI Approved :: MIT License
|
|
16
16
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -34,7 +34,7 @@ Description-Content-Type: text/markdown
|
|
|
34
34
|
|
|
35
35
|
# vesselapi-python
|
|
36
36
|
|
|
37
|
-
[](https://github.com/vessel-api/vesselapi-python/actions/workflows/ci.yml)
|
|
37
|
+
[](https://github.com/vessel-api/vesselapi-python/actions/workflows/ci.yml)
|
|
38
38
|
[](https://pypi.org/project/vessel-api-python/)
|
|
39
39
|
[](https://pypi.org/project/vessel-api-python/)
|
|
40
40
|
[](LICENSE)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# vesselapi-python
|
|
2
2
|
|
|
3
|
-
[](https://github.com/vessel-api/vesselapi-python/actions/workflows/ci.yml)
|
|
3
|
+
[](https://github.com/vessel-api/vesselapi-python/actions/workflows/ci.yml)
|
|
4
4
|
[](https://pypi.org/project/vessel-api-python/)
|
|
5
5
|
[](https://pypi.org/project/vessel-api-python/)
|
|
6
6
|
[](LICENSE)
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "vessel-api-python"
|
|
7
|
-
version = "1.
|
|
7
|
+
version = "1.1.0"
|
|
8
8
|
description = "Python client for the Vessel Tracking API — maritime vessel tracking, port events, emissions, and navigation data."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
@@ -14,7 +14,7 @@ authors = [
|
|
|
14
14
|
]
|
|
15
15
|
keywords = ["vesselapi", "maritime", "vessel", "tracking", "ais", "sdk"]
|
|
16
16
|
classifiers = [
|
|
17
|
-
"Development Status ::
|
|
17
|
+
"Development Status :: 5 - Production/Stable",
|
|
18
18
|
"Intended Audience :: Developers",
|
|
19
19
|
"License :: OSI Approved :: MIT License",
|
|
20
20
|
"Programming Language :: Python :: 3",
|
|
@@ -15,7 +15,9 @@ from typing import TYPE_CHECKING, Any
|
|
|
15
15
|
from ._errors import error_from_response
|
|
16
16
|
from ._iterator import AsyncIterator, SyncIterator
|
|
17
17
|
from ._models import (
|
|
18
|
+
MODU,
|
|
18
19
|
ClassificationResponse,
|
|
20
|
+
DGPSStation,
|
|
19
21
|
DGPSStationsWithinLocationResponse,
|
|
20
22
|
FindDGPSStationsResponse,
|
|
21
23
|
FindLightAidsResponse,
|
|
@@ -23,20 +25,29 @@ from ._models import (
|
|
|
23
25
|
FindPortsResponse,
|
|
24
26
|
FindRadioBeaconsResponse,
|
|
25
27
|
FindVesselsResponse,
|
|
28
|
+
LightAid,
|
|
26
29
|
LightAidsWithinLocationResponse,
|
|
27
30
|
MarineCasualtiesResponse,
|
|
31
|
+
MarineCasualty,
|
|
28
32
|
MODUsWithinLocationResponse,
|
|
33
|
+
Navtex,
|
|
29
34
|
NavtexMessagesResponse,
|
|
35
|
+
Port,
|
|
36
|
+
PortEvent,
|
|
30
37
|
PortEventResponse,
|
|
31
38
|
PortEventsResponse,
|
|
32
39
|
PortResponse,
|
|
33
40
|
PortsWithinLocationResponse,
|
|
41
|
+
RadioBeacon,
|
|
34
42
|
RadioBeaconsWithinLocationResponse,
|
|
35
43
|
TypesInspectionDetailResponse,
|
|
36
44
|
TypesInspectionsResponse,
|
|
37
45
|
TypesOwnershipResponse,
|
|
46
|
+
Vessel,
|
|
47
|
+
VesselEmission,
|
|
38
48
|
VesselEmissionsResponse,
|
|
39
49
|
VesselETAResponse,
|
|
50
|
+
VesselPosition,
|
|
40
51
|
VesselPositionResponse,
|
|
41
52
|
VesselPositionsResponse,
|
|
42
53
|
VesselResponse,
|
|
@@ -125,30 +136,30 @@ class VesselsService:
|
|
|
125
136
|
|
|
126
137
|
# --- Iterators ---
|
|
127
138
|
|
|
128
|
-
def all_casualties(self, vessel_id: str, *, filter_id_type: str = "imo", pagination_limit: int | None = None) -> SyncIterator[
|
|
139
|
+
def all_casualties(self, vessel_id: str, *, filter_id_type: str = "imo", pagination_limit: int | None = None) -> SyncIterator[MarineCasualty]:
|
|
129
140
|
"""Iterate over all casualties for a vessel across pages."""
|
|
130
141
|
token: str | None = None
|
|
131
|
-
def fetch() -> tuple[list[
|
|
142
|
+
def fetch() -> tuple[list[MarineCasualty], str | None]:
|
|
132
143
|
nonlocal token
|
|
133
144
|
resp = self.casualties(vessel_id, filter_id_type=filter_id_type, pagination_limit=pagination_limit, pagination_next_token=token)
|
|
134
145
|
token = resp.next_token
|
|
135
146
|
return resp.casualties or [], token
|
|
136
147
|
return SyncIterator(fetch)
|
|
137
148
|
|
|
138
|
-
def all_emissions(self, vessel_id: str, *, filter_id_type: str = "imo", pagination_limit: int | None = None) -> SyncIterator[
|
|
149
|
+
def all_emissions(self, vessel_id: str, *, filter_id_type: str = "imo", pagination_limit: int | None = None) -> SyncIterator[VesselEmission]:
|
|
139
150
|
"""Iterate over all emissions for a vessel across pages."""
|
|
140
151
|
token: str | None = None
|
|
141
|
-
def fetch() -> tuple[list[
|
|
152
|
+
def fetch() -> tuple[list[VesselEmission], str | None]:
|
|
142
153
|
nonlocal token
|
|
143
154
|
resp = self.emissions(vessel_id, filter_id_type=filter_id_type, pagination_limit=pagination_limit, pagination_next_token=token)
|
|
144
155
|
token = resp.next_token
|
|
145
156
|
return resp.emissions or [], token
|
|
146
157
|
return SyncIterator(fetch)
|
|
147
158
|
|
|
148
|
-
def all_positions(self, *, filter_id_type: str = "imo", filter_ids: str | None = None, pagination_limit: int | None = None) -> SyncIterator[
|
|
159
|
+
def all_positions(self, *, filter_id_type: str = "imo", filter_ids: str | None = None, pagination_limit: int | None = None) -> SyncIterator[VesselPosition]:
|
|
149
160
|
"""Iterate over all positions for multiple vessels across pages."""
|
|
150
161
|
token: str | None = None
|
|
151
|
-
def fetch() -> tuple[list[
|
|
162
|
+
def fetch() -> tuple[list[VesselPosition], str | None]:
|
|
152
163
|
nonlocal token
|
|
153
164
|
resp = self.positions(filter_id_type=filter_id_type, filter_ids=filter_ids, pagination_limit=pagination_limit, pagination_next_token=token)
|
|
154
165
|
token = resp.next_token
|
|
@@ -213,50 +224,50 @@ class PortEventsService:
|
|
|
213
224
|
|
|
214
225
|
# --- Iterators ---
|
|
215
226
|
|
|
216
|
-
def list_all(self, **kwargs: Any) -> SyncIterator[
|
|
227
|
+
def list_all(self, **kwargs: Any) -> SyncIterator[PortEvent]:
|
|
217
228
|
"""Iterate over all port events across pages."""
|
|
218
229
|
token: str | None = None
|
|
219
|
-
def fetch() -> tuple[list[
|
|
230
|
+
def fetch() -> tuple[list[PortEvent], str | None]:
|
|
220
231
|
nonlocal token
|
|
221
232
|
resp = self.list(**kwargs, pagination_next_token=token)
|
|
222
233
|
token = resp.next_token
|
|
223
234
|
return resp.port_events or [], token
|
|
224
235
|
return SyncIterator(fetch)
|
|
225
236
|
|
|
226
|
-
def all_by_port(self, unlocode: str, **kwargs: Any) -> SyncIterator[
|
|
237
|
+
def all_by_port(self, unlocode: str, **kwargs: Any) -> SyncIterator[PortEvent]:
|
|
227
238
|
"""Iterate over all port events for a specific port."""
|
|
228
239
|
token: str | None = None
|
|
229
|
-
def fetch() -> tuple[list[
|
|
240
|
+
def fetch() -> tuple[list[PortEvent], str | None]:
|
|
230
241
|
nonlocal token
|
|
231
242
|
resp = self.by_port(unlocode, **kwargs, pagination_next_token=token)
|
|
232
243
|
token = resp.next_token
|
|
233
244
|
return resp.port_events or [], token
|
|
234
245
|
return SyncIterator(fetch)
|
|
235
246
|
|
|
236
|
-
def all_by_ports(self, **kwargs: Any) -> SyncIterator[
|
|
247
|
+
def all_by_ports(self, **kwargs: Any) -> SyncIterator[PortEvent]:
|
|
237
248
|
"""Iterate over all port events by port name search."""
|
|
238
249
|
token: str | None = None
|
|
239
|
-
def fetch() -> tuple[list[
|
|
250
|
+
def fetch() -> tuple[list[PortEvent], str | None]:
|
|
240
251
|
nonlocal token
|
|
241
252
|
resp = self.by_ports(**kwargs, pagination_next_token=token)
|
|
242
253
|
token = resp.next_token
|
|
243
254
|
return resp.port_events or [], token
|
|
244
255
|
return SyncIterator(fetch)
|
|
245
256
|
|
|
246
|
-
def all_by_vessel(self, vessel_id: str, **kwargs: Any) -> SyncIterator[
|
|
257
|
+
def all_by_vessel(self, vessel_id: str, **kwargs: Any) -> SyncIterator[PortEvent]:
|
|
247
258
|
"""Iterate over all port events for a vessel."""
|
|
248
259
|
token: str | None = None
|
|
249
|
-
def fetch() -> tuple[list[
|
|
260
|
+
def fetch() -> tuple[list[PortEvent], str | None]:
|
|
250
261
|
nonlocal token
|
|
251
262
|
resp = self.by_vessel(vessel_id, **kwargs, pagination_next_token=token)
|
|
252
263
|
token = resp.next_token
|
|
253
264
|
return resp.port_events or [], token
|
|
254
265
|
return SyncIterator(fetch)
|
|
255
266
|
|
|
256
|
-
def all_by_vessels(self, **kwargs: Any) -> SyncIterator[
|
|
267
|
+
def all_by_vessels(self, **kwargs: Any) -> SyncIterator[PortEvent]:
|
|
257
268
|
"""Iterate over all port events by vessel name search."""
|
|
258
269
|
token: str | None = None
|
|
259
|
-
def fetch() -> tuple[list[
|
|
270
|
+
def fetch() -> tuple[list[PortEvent], str | None]:
|
|
260
271
|
nonlocal token
|
|
261
272
|
resp = self.by_vessels(**kwargs, pagination_next_token=token)
|
|
262
273
|
token = resp.next_token
|
|
@@ -276,10 +287,10 @@ class EmissionsService:
|
|
|
276
287
|
error_from_response(r.status_code, r.content)
|
|
277
288
|
return VesselEmissionsResponse.model_validate(r.json())
|
|
278
289
|
|
|
279
|
-
def list_all(self, **kwargs: Any) -> SyncIterator[
|
|
290
|
+
def list_all(self, **kwargs: Any) -> SyncIterator[VesselEmission]:
|
|
280
291
|
"""Iterate over all emissions across pages."""
|
|
281
292
|
token: str | None = None
|
|
282
|
-
def fetch() -> tuple[list[
|
|
293
|
+
def fetch() -> tuple[list[VesselEmission], str | None]:
|
|
283
294
|
nonlocal token
|
|
284
295
|
resp = self.list(**kwargs, pagination_next_token=token)
|
|
285
296
|
token = resp.next_token
|
|
@@ -331,60 +342,60 @@ class SearchService:
|
|
|
331
342
|
|
|
332
343
|
# --- Iterators ---
|
|
333
344
|
|
|
334
|
-
def all_vessels(self, **kwargs: Any) -> SyncIterator[
|
|
345
|
+
def all_vessels(self, **kwargs: Any) -> SyncIterator[Vessel]:
|
|
335
346
|
"""Iterate over all vessel search results across pages."""
|
|
336
347
|
token: str | None = None
|
|
337
|
-
def fetch() -> tuple[list[
|
|
348
|
+
def fetch() -> tuple[list[Vessel], str | None]:
|
|
338
349
|
nonlocal token
|
|
339
350
|
resp = self.vessels(**kwargs, pagination_next_token=token)
|
|
340
351
|
token = resp.next_token
|
|
341
352
|
return resp.vessels or [], token
|
|
342
353
|
return SyncIterator(fetch)
|
|
343
354
|
|
|
344
|
-
def all_ports(self, **kwargs: Any) -> SyncIterator[
|
|
355
|
+
def all_ports(self, **kwargs: Any) -> SyncIterator[Port]:
|
|
345
356
|
"""Iterate over all port search results across pages."""
|
|
346
357
|
token: str | None = None
|
|
347
|
-
def fetch() -> tuple[list[
|
|
358
|
+
def fetch() -> tuple[list[Port], str | None]:
|
|
348
359
|
nonlocal token
|
|
349
360
|
resp = self.ports(**kwargs, pagination_next_token=token)
|
|
350
361
|
token = resp.next_token
|
|
351
362
|
return resp.ports or [], token
|
|
352
363
|
return SyncIterator(fetch)
|
|
353
364
|
|
|
354
|
-
def all_dgps(self, **kwargs: Any) -> SyncIterator[
|
|
365
|
+
def all_dgps(self, **kwargs: Any) -> SyncIterator[DGPSStation]:
|
|
355
366
|
"""Iterate over all DGPS station search results."""
|
|
356
367
|
token: str | None = None
|
|
357
|
-
def fetch() -> tuple[list[
|
|
368
|
+
def fetch() -> tuple[list[DGPSStation], str | None]:
|
|
358
369
|
nonlocal token
|
|
359
370
|
resp = self.dgps(**kwargs, pagination_next_token=token)
|
|
360
371
|
token = resp.next_token
|
|
361
372
|
return resp.dgps_stations or [], token
|
|
362
373
|
return SyncIterator(fetch)
|
|
363
374
|
|
|
364
|
-
def all_light_aids(self, **kwargs: Any) -> SyncIterator[
|
|
375
|
+
def all_light_aids(self, **kwargs: Any) -> SyncIterator[LightAid]:
|
|
365
376
|
"""Iterate over all light aid search results."""
|
|
366
377
|
token: str | None = None
|
|
367
|
-
def fetch() -> tuple[list[
|
|
378
|
+
def fetch() -> tuple[list[LightAid], str | None]:
|
|
368
379
|
nonlocal token
|
|
369
380
|
resp = self.light_aids(**kwargs, pagination_next_token=token)
|
|
370
381
|
token = resp.next_token
|
|
371
382
|
return resp.light_aids or [], token
|
|
372
383
|
return SyncIterator(fetch)
|
|
373
384
|
|
|
374
|
-
def all_modus(self, **kwargs: Any) -> SyncIterator[
|
|
385
|
+
def all_modus(self, **kwargs: Any) -> SyncIterator[MODU]:
|
|
375
386
|
"""Iterate over all MODU search results."""
|
|
376
387
|
token: str | None = None
|
|
377
|
-
def fetch() -> tuple[list[
|
|
388
|
+
def fetch() -> tuple[list[MODU], str | None]:
|
|
378
389
|
nonlocal token
|
|
379
390
|
resp = self.modus(**kwargs, pagination_next_token=token)
|
|
380
391
|
token = resp.next_token
|
|
381
392
|
return resp.modus or [], token
|
|
382
393
|
return SyncIterator(fetch)
|
|
383
394
|
|
|
384
|
-
def all_radio_beacons(self, **kwargs: Any) -> SyncIterator[
|
|
395
|
+
def all_radio_beacons(self, **kwargs: Any) -> SyncIterator[RadioBeacon]:
|
|
385
396
|
"""Iterate over all radio beacon search results."""
|
|
386
397
|
token: str | None = None
|
|
387
|
-
def fetch() -> tuple[list[
|
|
398
|
+
def fetch() -> tuple[list[RadioBeacon], str | None]:
|
|
388
399
|
nonlocal token
|
|
389
400
|
resp = self.radio_beacons(**kwargs, pagination_next_token=token)
|
|
390
401
|
token = resp.next_token
|
|
@@ -472,120 +483,120 @@ class LocationService:
|
|
|
472
483
|
|
|
473
484
|
# --- Iterators ---
|
|
474
485
|
|
|
475
|
-
def all_vessels_bounding_box(self, **kwargs: Any) -> SyncIterator[
|
|
486
|
+
def all_vessels_bounding_box(self, **kwargs: Any) -> SyncIterator[VesselPosition]:
|
|
476
487
|
"""Iterate over all vessel positions in a bounding box."""
|
|
477
488
|
token: str | None = None
|
|
478
|
-
def fetch() -> tuple[list[
|
|
489
|
+
def fetch() -> tuple[list[VesselPosition], str | None]:
|
|
479
490
|
nonlocal token
|
|
480
491
|
resp = self.vessels_bounding_box(**kwargs, pagination_next_token=token)
|
|
481
492
|
token = resp.next_token
|
|
482
493
|
return resp.vessels or [], token
|
|
483
494
|
return SyncIterator(fetch)
|
|
484
495
|
|
|
485
|
-
def all_vessels_radius(self, **kwargs: Any) -> SyncIterator[
|
|
496
|
+
def all_vessels_radius(self, **kwargs: Any) -> SyncIterator[VesselPosition]:
|
|
486
497
|
"""Iterate over all vessel positions within a radius."""
|
|
487
498
|
token: str | None = None
|
|
488
|
-
def fetch() -> tuple[list[
|
|
499
|
+
def fetch() -> tuple[list[VesselPosition], str | None]:
|
|
489
500
|
nonlocal token
|
|
490
501
|
resp = self.vessels_radius(**kwargs, pagination_next_token=token)
|
|
491
502
|
token = resp.next_token
|
|
492
503
|
return resp.vessels or [], token
|
|
493
504
|
return SyncIterator(fetch)
|
|
494
505
|
|
|
495
|
-
def all_ports_bounding_box(self, **kwargs: Any) -> SyncIterator[
|
|
506
|
+
def all_ports_bounding_box(self, **kwargs: Any) -> SyncIterator[Port]:
|
|
496
507
|
"""Iterate over all ports in a bounding box."""
|
|
497
508
|
token: str | None = None
|
|
498
|
-
def fetch() -> tuple[list[
|
|
509
|
+
def fetch() -> tuple[list[Port], str | None]:
|
|
499
510
|
nonlocal token
|
|
500
511
|
resp = self.ports_bounding_box(**kwargs, pagination_next_token=token)
|
|
501
512
|
token = resp.next_token
|
|
502
513
|
return resp.ports or [], token
|
|
503
514
|
return SyncIterator(fetch)
|
|
504
515
|
|
|
505
|
-
def all_ports_radius(self, **kwargs: Any) -> SyncIterator[
|
|
516
|
+
def all_ports_radius(self, **kwargs: Any) -> SyncIterator[Port]:
|
|
506
517
|
"""Iterate over all ports within a radius."""
|
|
507
518
|
token: str | None = None
|
|
508
|
-
def fetch() -> tuple[list[
|
|
519
|
+
def fetch() -> tuple[list[Port], str | None]:
|
|
509
520
|
nonlocal token
|
|
510
521
|
resp = self.ports_radius(**kwargs, pagination_next_token=token)
|
|
511
522
|
token = resp.next_token
|
|
512
523
|
return resp.ports or [], token
|
|
513
524
|
return SyncIterator(fetch)
|
|
514
525
|
|
|
515
|
-
def all_dgps_bounding_box(self, **kwargs: Any) -> SyncIterator[
|
|
526
|
+
def all_dgps_bounding_box(self, **kwargs: Any) -> SyncIterator[DGPSStation]:
|
|
516
527
|
"""Iterate over all DGPS stations in a bounding box."""
|
|
517
528
|
token: str | None = None
|
|
518
|
-
def fetch() -> tuple[list[
|
|
529
|
+
def fetch() -> tuple[list[DGPSStation], str | None]:
|
|
519
530
|
nonlocal token
|
|
520
531
|
resp = self.dgps_bounding_box(**kwargs, pagination_next_token=token)
|
|
521
532
|
token = resp.next_token
|
|
522
533
|
return resp.dgps_stations or [], token
|
|
523
534
|
return SyncIterator(fetch)
|
|
524
535
|
|
|
525
|
-
def all_dgps_radius(self, **kwargs: Any) -> SyncIterator[
|
|
536
|
+
def all_dgps_radius(self, **kwargs: Any) -> SyncIterator[DGPSStation]:
|
|
526
537
|
"""Iterate over all DGPS stations within a radius."""
|
|
527
538
|
token: str | None = None
|
|
528
|
-
def fetch() -> tuple[list[
|
|
539
|
+
def fetch() -> tuple[list[DGPSStation], str | None]:
|
|
529
540
|
nonlocal token
|
|
530
541
|
resp = self.dgps_radius(**kwargs, pagination_next_token=token)
|
|
531
542
|
token = resp.next_token
|
|
532
543
|
return resp.dgps_stations or [], token
|
|
533
544
|
return SyncIterator(fetch)
|
|
534
545
|
|
|
535
|
-
def all_light_aids_bounding_box(self, **kwargs: Any) -> SyncIterator[
|
|
546
|
+
def all_light_aids_bounding_box(self, **kwargs: Any) -> SyncIterator[LightAid]:
|
|
536
547
|
"""Iterate over all light aids in a bounding box."""
|
|
537
548
|
token: str | None = None
|
|
538
|
-
def fetch() -> tuple[list[
|
|
549
|
+
def fetch() -> tuple[list[LightAid], str | None]:
|
|
539
550
|
nonlocal token
|
|
540
551
|
resp = self.light_aids_bounding_box(**kwargs, pagination_next_token=token)
|
|
541
552
|
token = resp.next_token
|
|
542
553
|
return resp.light_aids or [], token
|
|
543
554
|
return SyncIterator(fetch)
|
|
544
555
|
|
|
545
|
-
def all_light_aids_radius(self, **kwargs: Any) -> SyncIterator[
|
|
556
|
+
def all_light_aids_radius(self, **kwargs: Any) -> SyncIterator[LightAid]:
|
|
546
557
|
"""Iterate over all light aids within a radius."""
|
|
547
558
|
token: str | None = None
|
|
548
|
-
def fetch() -> tuple[list[
|
|
559
|
+
def fetch() -> tuple[list[LightAid], str | None]:
|
|
549
560
|
nonlocal token
|
|
550
561
|
resp = self.light_aids_radius(**kwargs, pagination_next_token=token)
|
|
551
562
|
token = resp.next_token
|
|
552
563
|
return resp.light_aids or [], token
|
|
553
564
|
return SyncIterator(fetch)
|
|
554
565
|
|
|
555
|
-
def all_modus_bounding_box(self, **kwargs: Any) -> SyncIterator[
|
|
566
|
+
def all_modus_bounding_box(self, **kwargs: Any) -> SyncIterator[MODU]:
|
|
556
567
|
"""Iterate over all MODUs in a bounding box."""
|
|
557
568
|
token: str | None = None
|
|
558
|
-
def fetch() -> tuple[list[
|
|
569
|
+
def fetch() -> tuple[list[MODU], str | None]:
|
|
559
570
|
nonlocal token
|
|
560
571
|
resp = self.modus_bounding_box(**kwargs, pagination_next_token=token)
|
|
561
572
|
token = resp.next_token
|
|
562
573
|
return resp.modus or [], token
|
|
563
574
|
return SyncIterator(fetch)
|
|
564
575
|
|
|
565
|
-
def all_modus_radius(self, **kwargs: Any) -> SyncIterator[
|
|
576
|
+
def all_modus_radius(self, **kwargs: Any) -> SyncIterator[MODU]:
|
|
566
577
|
"""Iterate over all MODUs within a radius."""
|
|
567
578
|
token: str | None = None
|
|
568
|
-
def fetch() -> tuple[list[
|
|
579
|
+
def fetch() -> tuple[list[MODU], str | None]:
|
|
569
580
|
nonlocal token
|
|
570
581
|
resp = self.modus_radius(**kwargs, pagination_next_token=token)
|
|
571
582
|
token = resp.next_token
|
|
572
583
|
return resp.modus or [], token
|
|
573
584
|
return SyncIterator(fetch)
|
|
574
585
|
|
|
575
|
-
def all_radio_beacons_bounding_box(self, **kwargs: Any) -> SyncIterator[
|
|
586
|
+
def all_radio_beacons_bounding_box(self, **kwargs: Any) -> SyncIterator[RadioBeacon]:
|
|
576
587
|
"""Iterate over all radio beacons in a bounding box."""
|
|
577
588
|
token: str | None = None
|
|
578
|
-
def fetch() -> tuple[list[
|
|
589
|
+
def fetch() -> tuple[list[RadioBeacon], str | None]:
|
|
579
590
|
nonlocal token
|
|
580
591
|
resp = self.radio_beacons_bounding_box(**kwargs, pagination_next_token=token)
|
|
581
592
|
token = resp.next_token
|
|
582
593
|
return resp.radio_beacons or [], token
|
|
583
594
|
return SyncIterator(fetch)
|
|
584
595
|
|
|
585
|
-
def all_radio_beacons_radius(self, **kwargs: Any) -> SyncIterator[
|
|
596
|
+
def all_radio_beacons_radius(self, **kwargs: Any) -> SyncIterator[RadioBeacon]:
|
|
586
597
|
"""Iterate over all radio beacons within a radius."""
|
|
587
598
|
token: str | None = None
|
|
588
|
-
def fetch() -> tuple[list[
|
|
599
|
+
def fetch() -> tuple[list[RadioBeacon], str | None]:
|
|
589
600
|
nonlocal token
|
|
590
601
|
resp = self.radio_beacons_radius(**kwargs, pagination_next_token=token)
|
|
591
602
|
token = resp.next_token
|
|
@@ -605,10 +616,10 @@ class NavtexService:
|
|
|
605
616
|
error_from_response(r.status_code, r.content)
|
|
606
617
|
return NavtexMessagesResponse.model_validate(r.json())
|
|
607
618
|
|
|
608
|
-
def list_all(self, **kwargs: Any) -> SyncIterator[
|
|
619
|
+
def list_all(self, **kwargs: Any) -> SyncIterator[Navtex]:
|
|
609
620
|
"""Iterate over all NAVTEX messages across pages."""
|
|
610
621
|
token: str | None = None
|
|
611
|
-
def fetch() -> tuple[list[
|
|
622
|
+
def fetch() -> tuple[list[Navtex], str | None]:
|
|
612
623
|
nonlocal token
|
|
613
624
|
resp = self.list(**kwargs, pagination_next_token=token)
|
|
614
625
|
token = resp.next_token
|
|
@@ -689,30 +700,30 @@ class AsyncVesselsService:
|
|
|
689
700
|
|
|
690
701
|
# --- Iterators ---
|
|
691
702
|
|
|
692
|
-
def all_casualties(self, vessel_id: str, *, filter_id_type: str = "imo", pagination_limit: int | None = None) -> AsyncIterator[
|
|
703
|
+
def all_casualties(self, vessel_id: str, *, filter_id_type: str = "imo", pagination_limit: int | None = None) -> AsyncIterator[MarineCasualty]:
|
|
693
704
|
"""Iterate over all casualties for a vessel across pages."""
|
|
694
705
|
token: str | None = None
|
|
695
|
-
async def fetch() -> tuple[list[
|
|
706
|
+
async def fetch() -> tuple[list[MarineCasualty], str | None]:
|
|
696
707
|
nonlocal token
|
|
697
708
|
resp = await self.casualties(vessel_id, filter_id_type=filter_id_type, pagination_limit=pagination_limit, pagination_next_token=token)
|
|
698
709
|
token = resp.next_token
|
|
699
710
|
return resp.casualties or [], token
|
|
700
711
|
return AsyncIterator(fetch)
|
|
701
712
|
|
|
702
|
-
def all_emissions(self, vessel_id: str, *, filter_id_type: str = "imo", pagination_limit: int | None = None) -> AsyncIterator[
|
|
713
|
+
def all_emissions(self, vessel_id: str, *, filter_id_type: str = "imo", pagination_limit: int | None = None) -> AsyncIterator[VesselEmission]:
|
|
703
714
|
"""Iterate over all emissions for a vessel across pages."""
|
|
704
715
|
token: str | None = None
|
|
705
|
-
async def fetch() -> tuple[list[
|
|
716
|
+
async def fetch() -> tuple[list[VesselEmission], str | None]:
|
|
706
717
|
nonlocal token
|
|
707
718
|
resp = await self.emissions(vessel_id, filter_id_type=filter_id_type, pagination_limit=pagination_limit, pagination_next_token=token)
|
|
708
719
|
token = resp.next_token
|
|
709
720
|
return resp.emissions or [], token
|
|
710
721
|
return AsyncIterator(fetch)
|
|
711
722
|
|
|
712
|
-
def all_positions(self, *, filter_id_type: str = "imo", filter_ids: str | None = None, pagination_limit: int | None = None) -> AsyncIterator[
|
|
723
|
+
def all_positions(self, *, filter_id_type: str = "imo", filter_ids: str | None = None, pagination_limit: int | None = None) -> AsyncIterator[VesselPosition]:
|
|
713
724
|
"""Iterate over all positions for multiple vessels across pages."""
|
|
714
725
|
token: str | None = None
|
|
715
|
-
async def fetch() -> tuple[list[
|
|
726
|
+
async def fetch() -> tuple[list[VesselPosition], str | None]:
|
|
716
727
|
nonlocal token
|
|
717
728
|
resp = await self.positions(filter_id_type=filter_id_type, filter_ids=filter_ids, pagination_limit=pagination_limit, pagination_next_token=token)
|
|
718
729
|
token = resp.next_token
|
|
@@ -777,50 +788,50 @@ class AsyncPortEventsService:
|
|
|
777
788
|
|
|
778
789
|
# --- Iterators ---
|
|
779
790
|
|
|
780
|
-
def list_all(self, **kwargs: Any) -> AsyncIterator[
|
|
791
|
+
def list_all(self, **kwargs: Any) -> AsyncIterator[PortEvent]:
|
|
781
792
|
"""Iterate over all port events across pages."""
|
|
782
793
|
token: str | None = None
|
|
783
|
-
async def fetch() -> tuple[list[
|
|
794
|
+
async def fetch() -> tuple[list[PortEvent], str | None]:
|
|
784
795
|
nonlocal token
|
|
785
796
|
resp = await self.list(**kwargs, pagination_next_token=token)
|
|
786
797
|
token = resp.next_token
|
|
787
798
|
return resp.port_events or [], token
|
|
788
799
|
return AsyncIterator(fetch)
|
|
789
800
|
|
|
790
|
-
def all_by_port(self, unlocode: str, **kwargs: Any) -> AsyncIterator[
|
|
801
|
+
def all_by_port(self, unlocode: str, **kwargs: Any) -> AsyncIterator[PortEvent]:
|
|
791
802
|
"""Iterate over all port events for a specific port."""
|
|
792
803
|
token: str | None = None
|
|
793
|
-
async def fetch() -> tuple[list[
|
|
804
|
+
async def fetch() -> tuple[list[PortEvent], str | None]:
|
|
794
805
|
nonlocal token
|
|
795
806
|
resp = await self.by_port(unlocode, **kwargs, pagination_next_token=token)
|
|
796
807
|
token = resp.next_token
|
|
797
808
|
return resp.port_events or [], token
|
|
798
809
|
return AsyncIterator(fetch)
|
|
799
810
|
|
|
800
|
-
def all_by_ports(self, **kwargs: Any) -> AsyncIterator[
|
|
811
|
+
def all_by_ports(self, **kwargs: Any) -> AsyncIterator[PortEvent]:
|
|
801
812
|
"""Iterate over all port events by port name search."""
|
|
802
813
|
token: str | None = None
|
|
803
|
-
async def fetch() -> tuple[list[
|
|
814
|
+
async def fetch() -> tuple[list[PortEvent], str | None]:
|
|
804
815
|
nonlocal token
|
|
805
816
|
resp = await self.by_ports(**kwargs, pagination_next_token=token)
|
|
806
817
|
token = resp.next_token
|
|
807
818
|
return resp.port_events or [], token
|
|
808
819
|
return AsyncIterator(fetch)
|
|
809
820
|
|
|
810
|
-
def all_by_vessel(self, vessel_id: str, **kwargs: Any) -> AsyncIterator[
|
|
821
|
+
def all_by_vessel(self, vessel_id: str, **kwargs: Any) -> AsyncIterator[PortEvent]:
|
|
811
822
|
"""Iterate over all port events for a vessel."""
|
|
812
823
|
token: str | None = None
|
|
813
|
-
async def fetch() -> tuple[list[
|
|
824
|
+
async def fetch() -> tuple[list[PortEvent], str | None]:
|
|
814
825
|
nonlocal token
|
|
815
826
|
resp = await self.by_vessel(vessel_id, **kwargs, pagination_next_token=token)
|
|
816
827
|
token = resp.next_token
|
|
817
828
|
return resp.port_events or [], token
|
|
818
829
|
return AsyncIterator(fetch)
|
|
819
830
|
|
|
820
|
-
def all_by_vessels(self, **kwargs: Any) -> AsyncIterator[
|
|
831
|
+
def all_by_vessels(self, **kwargs: Any) -> AsyncIterator[PortEvent]:
|
|
821
832
|
"""Iterate over all port events by vessel name search."""
|
|
822
833
|
token: str | None = None
|
|
823
|
-
async def fetch() -> tuple[list[
|
|
834
|
+
async def fetch() -> tuple[list[PortEvent], str | None]:
|
|
824
835
|
nonlocal token
|
|
825
836
|
resp = await self.by_vessels(**kwargs, pagination_next_token=token)
|
|
826
837
|
token = resp.next_token
|
|
@@ -840,10 +851,10 @@ class AsyncEmissionsService:
|
|
|
840
851
|
error_from_response(r.status_code, r.content)
|
|
841
852
|
return VesselEmissionsResponse.model_validate(r.json())
|
|
842
853
|
|
|
843
|
-
def list_all(self, **kwargs: Any) -> AsyncIterator[
|
|
854
|
+
def list_all(self, **kwargs: Any) -> AsyncIterator[VesselEmission]:
|
|
844
855
|
"""Iterate over all emissions across pages."""
|
|
845
856
|
token: str | None = None
|
|
846
|
-
async def fetch() -> tuple[list[
|
|
857
|
+
async def fetch() -> tuple[list[VesselEmission], str | None]:
|
|
847
858
|
nonlocal token
|
|
848
859
|
resp = await self.list(**kwargs, pagination_next_token=token)
|
|
849
860
|
token = resp.next_token
|
|
@@ -895,60 +906,60 @@ class AsyncSearchService:
|
|
|
895
906
|
|
|
896
907
|
# --- Iterators ---
|
|
897
908
|
|
|
898
|
-
def all_vessels(self, **kwargs: Any) -> AsyncIterator[
|
|
909
|
+
def all_vessels(self, **kwargs: Any) -> AsyncIterator[Vessel]:
|
|
899
910
|
"""Iterate over all vessel search results."""
|
|
900
911
|
token: str | None = None
|
|
901
|
-
async def fetch() -> tuple[list[
|
|
912
|
+
async def fetch() -> tuple[list[Vessel], str | None]:
|
|
902
913
|
nonlocal token
|
|
903
914
|
resp = await self.vessels(**kwargs, pagination_next_token=token)
|
|
904
915
|
token = resp.next_token
|
|
905
916
|
return resp.vessels or [], token
|
|
906
917
|
return AsyncIterator(fetch)
|
|
907
918
|
|
|
908
|
-
def all_ports(self, **kwargs: Any) -> AsyncIterator[
|
|
919
|
+
def all_ports(self, **kwargs: Any) -> AsyncIterator[Port]:
|
|
909
920
|
"""Iterate over all port search results."""
|
|
910
921
|
token: str | None = None
|
|
911
|
-
async def fetch() -> tuple[list[
|
|
922
|
+
async def fetch() -> tuple[list[Port], str | None]:
|
|
912
923
|
nonlocal token
|
|
913
924
|
resp = await self.ports(**kwargs, pagination_next_token=token)
|
|
914
925
|
token = resp.next_token
|
|
915
926
|
return resp.ports or [], token
|
|
916
927
|
return AsyncIterator(fetch)
|
|
917
928
|
|
|
918
|
-
def all_dgps(self, **kwargs: Any) -> AsyncIterator[
|
|
929
|
+
def all_dgps(self, **kwargs: Any) -> AsyncIterator[DGPSStation]:
|
|
919
930
|
"""Iterate over all DGPS station search results."""
|
|
920
931
|
token: str | None = None
|
|
921
|
-
async def fetch() -> tuple[list[
|
|
932
|
+
async def fetch() -> tuple[list[DGPSStation], str | None]:
|
|
922
933
|
nonlocal token
|
|
923
934
|
resp = await self.dgps(**kwargs, pagination_next_token=token)
|
|
924
935
|
token = resp.next_token
|
|
925
936
|
return resp.dgps_stations or [], token
|
|
926
937
|
return AsyncIterator(fetch)
|
|
927
938
|
|
|
928
|
-
def all_light_aids(self, **kwargs: Any) -> AsyncIterator[
|
|
939
|
+
def all_light_aids(self, **kwargs: Any) -> AsyncIterator[LightAid]:
|
|
929
940
|
"""Iterate over all light aid search results."""
|
|
930
941
|
token: str | None = None
|
|
931
|
-
async def fetch() -> tuple[list[
|
|
942
|
+
async def fetch() -> tuple[list[LightAid], str | None]:
|
|
932
943
|
nonlocal token
|
|
933
944
|
resp = await self.light_aids(**kwargs, pagination_next_token=token)
|
|
934
945
|
token = resp.next_token
|
|
935
946
|
return resp.light_aids or [], token
|
|
936
947
|
return AsyncIterator(fetch)
|
|
937
948
|
|
|
938
|
-
def all_modus(self, **kwargs: Any) -> AsyncIterator[
|
|
949
|
+
def all_modus(self, **kwargs: Any) -> AsyncIterator[MODU]:
|
|
939
950
|
"""Iterate over all MODU search results."""
|
|
940
951
|
token: str | None = None
|
|
941
|
-
async def fetch() -> tuple[list[
|
|
952
|
+
async def fetch() -> tuple[list[MODU], str | None]:
|
|
942
953
|
nonlocal token
|
|
943
954
|
resp = await self.modus(**kwargs, pagination_next_token=token)
|
|
944
955
|
token = resp.next_token
|
|
945
956
|
return resp.modus or [], token
|
|
946
957
|
return AsyncIterator(fetch)
|
|
947
958
|
|
|
948
|
-
def all_radio_beacons(self, **kwargs: Any) -> AsyncIterator[
|
|
959
|
+
def all_radio_beacons(self, **kwargs: Any) -> AsyncIterator[RadioBeacon]:
|
|
949
960
|
"""Iterate over all radio beacon search results."""
|
|
950
961
|
token: str | None = None
|
|
951
|
-
async def fetch() -> tuple[list[
|
|
962
|
+
async def fetch() -> tuple[list[RadioBeacon], str | None]:
|
|
952
963
|
nonlocal token
|
|
953
964
|
resp = await self.radio_beacons(**kwargs, pagination_next_token=token)
|
|
954
965
|
token = resp.next_token
|
|
@@ -1036,120 +1047,120 @@ class AsyncLocationService:
|
|
|
1036
1047
|
|
|
1037
1048
|
# --- Iterators ---
|
|
1038
1049
|
|
|
1039
|
-
def all_vessels_bounding_box(self, **kwargs: Any) -> AsyncIterator[
|
|
1050
|
+
def all_vessels_bounding_box(self, **kwargs: Any) -> AsyncIterator[VesselPosition]:
|
|
1040
1051
|
"""Iterate over all vessel positions in a bounding box."""
|
|
1041
1052
|
token: str | None = None
|
|
1042
|
-
async def fetch() -> tuple[list[
|
|
1053
|
+
async def fetch() -> tuple[list[VesselPosition], str | None]:
|
|
1043
1054
|
nonlocal token
|
|
1044
1055
|
resp = await self.vessels_bounding_box(**kwargs, pagination_next_token=token)
|
|
1045
1056
|
token = resp.next_token
|
|
1046
1057
|
return resp.vessels or [], token
|
|
1047
1058
|
return AsyncIterator(fetch)
|
|
1048
1059
|
|
|
1049
|
-
def all_vessels_radius(self, **kwargs: Any) -> AsyncIterator[
|
|
1060
|
+
def all_vessels_radius(self, **kwargs: Any) -> AsyncIterator[VesselPosition]:
|
|
1050
1061
|
"""Iterate over all vessel positions within a radius."""
|
|
1051
1062
|
token: str | None = None
|
|
1052
|
-
async def fetch() -> tuple[list[
|
|
1063
|
+
async def fetch() -> tuple[list[VesselPosition], str | None]:
|
|
1053
1064
|
nonlocal token
|
|
1054
1065
|
resp = await self.vessels_radius(**kwargs, pagination_next_token=token)
|
|
1055
1066
|
token = resp.next_token
|
|
1056
1067
|
return resp.vessels or [], token
|
|
1057
1068
|
return AsyncIterator(fetch)
|
|
1058
1069
|
|
|
1059
|
-
def all_ports_bounding_box(self, **kwargs: Any) -> AsyncIterator[
|
|
1070
|
+
def all_ports_bounding_box(self, **kwargs: Any) -> AsyncIterator[Port]:
|
|
1060
1071
|
"""Iterate over all ports in a bounding box."""
|
|
1061
1072
|
token: str | None = None
|
|
1062
|
-
async def fetch() -> tuple[list[
|
|
1073
|
+
async def fetch() -> tuple[list[Port], str | None]:
|
|
1063
1074
|
nonlocal token
|
|
1064
1075
|
resp = await self.ports_bounding_box(**kwargs, pagination_next_token=token)
|
|
1065
1076
|
token = resp.next_token
|
|
1066
1077
|
return resp.ports or [], token
|
|
1067
1078
|
return AsyncIterator(fetch)
|
|
1068
1079
|
|
|
1069
|
-
def all_ports_radius(self, **kwargs: Any) -> AsyncIterator[
|
|
1080
|
+
def all_ports_radius(self, **kwargs: Any) -> AsyncIterator[Port]:
|
|
1070
1081
|
"""Iterate over all ports within a radius."""
|
|
1071
1082
|
token: str | None = None
|
|
1072
|
-
async def fetch() -> tuple[list[
|
|
1083
|
+
async def fetch() -> tuple[list[Port], str | None]:
|
|
1073
1084
|
nonlocal token
|
|
1074
1085
|
resp = await self.ports_radius(**kwargs, pagination_next_token=token)
|
|
1075
1086
|
token = resp.next_token
|
|
1076
1087
|
return resp.ports or [], token
|
|
1077
1088
|
return AsyncIterator(fetch)
|
|
1078
1089
|
|
|
1079
|
-
def all_dgps_bounding_box(self, **kwargs: Any) -> AsyncIterator[
|
|
1090
|
+
def all_dgps_bounding_box(self, **kwargs: Any) -> AsyncIterator[DGPSStation]:
|
|
1080
1091
|
"""Iterate over all DGPS stations in a bounding box."""
|
|
1081
1092
|
token: str | None = None
|
|
1082
|
-
async def fetch() -> tuple[list[
|
|
1093
|
+
async def fetch() -> tuple[list[DGPSStation], str | None]:
|
|
1083
1094
|
nonlocal token
|
|
1084
1095
|
resp = await self.dgps_bounding_box(**kwargs, pagination_next_token=token)
|
|
1085
1096
|
token = resp.next_token
|
|
1086
1097
|
return resp.dgps_stations or [], token
|
|
1087
1098
|
return AsyncIterator(fetch)
|
|
1088
1099
|
|
|
1089
|
-
def all_dgps_radius(self, **kwargs: Any) -> AsyncIterator[
|
|
1100
|
+
def all_dgps_radius(self, **kwargs: Any) -> AsyncIterator[DGPSStation]:
|
|
1090
1101
|
"""Iterate over all DGPS stations within a radius."""
|
|
1091
1102
|
token: str | None = None
|
|
1092
|
-
async def fetch() -> tuple[list[
|
|
1103
|
+
async def fetch() -> tuple[list[DGPSStation], str | None]:
|
|
1093
1104
|
nonlocal token
|
|
1094
1105
|
resp = await self.dgps_radius(**kwargs, pagination_next_token=token)
|
|
1095
1106
|
token = resp.next_token
|
|
1096
1107
|
return resp.dgps_stations or [], token
|
|
1097
1108
|
return AsyncIterator(fetch)
|
|
1098
1109
|
|
|
1099
|
-
def all_light_aids_bounding_box(self, **kwargs: Any) -> AsyncIterator[
|
|
1110
|
+
def all_light_aids_bounding_box(self, **kwargs: Any) -> AsyncIterator[LightAid]:
|
|
1100
1111
|
"""Iterate over all light aids in a bounding box."""
|
|
1101
1112
|
token: str | None = None
|
|
1102
|
-
async def fetch() -> tuple[list[
|
|
1113
|
+
async def fetch() -> tuple[list[LightAid], str | None]:
|
|
1103
1114
|
nonlocal token
|
|
1104
1115
|
resp = await self.light_aids_bounding_box(**kwargs, pagination_next_token=token)
|
|
1105
1116
|
token = resp.next_token
|
|
1106
1117
|
return resp.light_aids or [], token
|
|
1107
1118
|
return AsyncIterator(fetch)
|
|
1108
1119
|
|
|
1109
|
-
def all_light_aids_radius(self, **kwargs: Any) -> AsyncIterator[
|
|
1120
|
+
def all_light_aids_radius(self, **kwargs: Any) -> AsyncIterator[LightAid]:
|
|
1110
1121
|
"""Iterate over all light aids within a radius."""
|
|
1111
1122
|
token: str | None = None
|
|
1112
|
-
async def fetch() -> tuple[list[
|
|
1123
|
+
async def fetch() -> tuple[list[LightAid], str | None]:
|
|
1113
1124
|
nonlocal token
|
|
1114
1125
|
resp = await self.light_aids_radius(**kwargs, pagination_next_token=token)
|
|
1115
1126
|
token = resp.next_token
|
|
1116
1127
|
return resp.light_aids or [], token
|
|
1117
1128
|
return AsyncIterator(fetch)
|
|
1118
1129
|
|
|
1119
|
-
def all_modus_bounding_box(self, **kwargs: Any) -> AsyncIterator[
|
|
1130
|
+
def all_modus_bounding_box(self, **kwargs: Any) -> AsyncIterator[MODU]:
|
|
1120
1131
|
"""Iterate over all MODUs in a bounding box."""
|
|
1121
1132
|
token: str | None = None
|
|
1122
|
-
async def fetch() -> tuple[list[
|
|
1133
|
+
async def fetch() -> tuple[list[MODU], str | None]:
|
|
1123
1134
|
nonlocal token
|
|
1124
1135
|
resp = await self.modus_bounding_box(**kwargs, pagination_next_token=token)
|
|
1125
1136
|
token = resp.next_token
|
|
1126
1137
|
return resp.modus or [], token
|
|
1127
1138
|
return AsyncIterator(fetch)
|
|
1128
1139
|
|
|
1129
|
-
def all_modus_radius(self, **kwargs: Any) -> AsyncIterator[
|
|
1140
|
+
def all_modus_radius(self, **kwargs: Any) -> AsyncIterator[MODU]:
|
|
1130
1141
|
"""Iterate over all MODUs within a radius."""
|
|
1131
1142
|
token: str | None = None
|
|
1132
|
-
async def fetch() -> tuple[list[
|
|
1143
|
+
async def fetch() -> tuple[list[MODU], str | None]:
|
|
1133
1144
|
nonlocal token
|
|
1134
1145
|
resp = await self.modus_radius(**kwargs, pagination_next_token=token)
|
|
1135
1146
|
token = resp.next_token
|
|
1136
1147
|
return resp.modus or [], token
|
|
1137
1148
|
return AsyncIterator(fetch)
|
|
1138
1149
|
|
|
1139
|
-
def all_radio_beacons_bounding_box(self, **kwargs: Any) -> AsyncIterator[
|
|
1150
|
+
def all_radio_beacons_bounding_box(self, **kwargs: Any) -> AsyncIterator[RadioBeacon]:
|
|
1140
1151
|
"""Iterate over all radio beacons in a bounding box."""
|
|
1141
1152
|
token: str | None = None
|
|
1142
|
-
async def fetch() -> tuple[list[
|
|
1153
|
+
async def fetch() -> tuple[list[RadioBeacon], str | None]:
|
|
1143
1154
|
nonlocal token
|
|
1144
1155
|
resp = await self.radio_beacons_bounding_box(**kwargs, pagination_next_token=token)
|
|
1145
1156
|
token = resp.next_token
|
|
1146
1157
|
return resp.radio_beacons or [], token
|
|
1147
1158
|
return AsyncIterator(fetch)
|
|
1148
1159
|
|
|
1149
|
-
def all_radio_beacons_radius(self, **kwargs: Any) -> AsyncIterator[
|
|
1160
|
+
def all_radio_beacons_radius(self, **kwargs: Any) -> AsyncIterator[RadioBeacon]:
|
|
1150
1161
|
"""Iterate over all radio beacons within a radius."""
|
|
1151
1162
|
token: str | None = None
|
|
1152
|
-
async def fetch() -> tuple[list[
|
|
1163
|
+
async def fetch() -> tuple[list[RadioBeacon], str | None]:
|
|
1153
1164
|
nonlocal token
|
|
1154
1165
|
resp = await self.radio_beacons_radius(**kwargs, pagination_next_token=token)
|
|
1155
1166
|
token = resp.next_token
|
|
@@ -1169,10 +1180,10 @@ class AsyncNavtexService:
|
|
|
1169
1180
|
error_from_response(r.status_code, r.content)
|
|
1170
1181
|
return NavtexMessagesResponse.model_validate(r.json())
|
|
1171
1182
|
|
|
1172
|
-
def list_all(self, **kwargs: Any) -> AsyncIterator[
|
|
1183
|
+
def list_all(self, **kwargs: Any) -> AsyncIterator[Navtex]:
|
|
1173
1184
|
"""Iterate over all NAVTEX messages across pages."""
|
|
1174
1185
|
token: str | None = None
|
|
1175
|
-
async def fetch() -> tuple[list[
|
|
1186
|
+
async def fetch() -> tuple[list[Navtex], str | None]:
|
|
1176
1187
|
nonlocal token
|
|
1177
1188
|
resp = await self.list(**kwargs, pagination_next_token=token)
|
|
1178
1189
|
token = resp.next_token
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|