vessel-api-python 2.1.0__tar.gz → 2.1.2__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.
@@ -3,7 +3,41 @@
3
3
  All notable changes to this package are documented here.
4
4
  This project follows [Semantic Versioning](https://semver.org/).
5
5
 
6
- ## [2.1.0] - 2026-10-26
6
+ ## [2.1.2] - 2026-11-01
7
+
8
+ ### Deprecated
9
+
10
+ - The satellite fallback (`filter_sat`, `filter_sat_lookback_minutes` and `filter_sat_max_age_minutes`) is withdrawn in its current form. The parameters keep working for existing credit holders until 00:00 UTC on 30 November 2026; from then they are accepted and ignored, no credit is charged, and the response carries a Warning header. Responses carry Deprecation and Sunset headers from 31 October 2026. Credit packs are no longer on sale; unspent credits are refunded on request. Documentation and spec only, no function, parameter or type changed.
11
+
12
+ ## [2.1.1] - 2026-10-27
13
+
14
+ Documentation and spec only. No method, parameter or model changed.
15
+
16
+ ### Changed
17
+
18
+ - The API now returns `identity_match` in `PositionCheck` only when it holds a
19
+ record for the vessel and an identifier can be compared. In other cases the
20
+ field is `None`. Before this change, a vessel with no record always got `True`.
21
+ - The API now checks every returned position for a suspected glitch, measured
22
+ from the vessel's previous clean report. More positions can come back with
23
+ `suspected_glitch` set to `True`.
24
+ - The bundled OpenAPI spec is synced with the API. Field descriptions no longer
25
+ begin with an internal field name ("DistanceNM Great-circle distance..." now
26
+ reads "Great-circle distance...").
27
+
28
+ ### Fixed
29
+
30
+ - Docstrings now say when `identity_match` and `vessel_eta` are `None`.
31
+ `vessel_eta` is `None` when no destination or ETA is available, including when
32
+ the lookup does not finish in time. The 2.1.0 notes said it was `None` only
33
+ when the API held no record.
34
+ - `exceeds_typical_speed` and `speed_observed_max` describe the vessel's usual
35
+ top speed (the 99th percentile of its recent speeds) and no longer call it a
36
+ peak.
37
+ - Docstrings call the position in the response the "returned" position, where
38
+ they said "served".
39
+
40
+ ## [2.1.0] - 2026-10-27
7
41
 
8
42
  ### Added
9
43
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: vessel-api-python
3
- Version: 2.1.0
3
+ Version: 2.1.2
4
4
  Summary: Python client for the Vessel Tracking API: maritime vessel tracking, port events, emissions, and nautical infrastructure.
5
5
  Project-URL: Documentation, https://vesselapi.com/docs
6
6
  Project-URL: Repository, https://github.com/vessel-api/vesselapi-python
@@ -131,9 +131,7 @@ print(f"{vessel.vessel.name} ({vessel.vessel.vessel_type})")
131
131
  pos = client.vessels.position("232003239", filter_id_type="mmsi")
132
132
  print(f"Position: {pos.vessel_position.latitude}, {pos.vessel_position.longitude}")
133
133
 
134
- # filter_sat=True falls back to satellite AIS when no recent terrestrial position is stored.
135
- # ⚠️ Satellite lookups draw on a prepaid balance and are charged per call.
136
- # Omit it unless you need that fallback.
134
+ # filter_sat is deprecated: the satellite fallback is withdrawn in its current form.
137
135
 
138
136
  # Find vessels with an AIS position within 10 km of Rotterdam in the last 2 hours
139
137
  # (the default time window, at most 4 hours).
@@ -142,6 +140,8 @@ for v in nearby.vessels or []:
142
140
  print(f"{v.vessel_name} at {v.latitude}, {v.longitude}")
143
141
  ```
144
142
 
143
+ > **Deprecated.** The satellite fallback is withdrawn in its current form. Requests with `filter.sat=true` keep working for existing credit holders until the cutoff date and carry Deprecation and Sunset headers. From the cutoff date the parameter is accepted and ignored, the response carries a Warning header, and no credit is charged. Credit packs are no longer on sale; unspent credits are refunded on request to support@vesselapi.com. The cutoff date is given in the `Sunset` header.
144
+
145
145
  ## Search
146
146
 
147
147
  `search.vessels` accepts `q`, a unified search across IMO, MMSI, ENI, callsign and
@@ -97,9 +97,7 @@ print(f"{vessel.vessel.name} ({vessel.vessel.vessel_type})")
97
97
  pos = client.vessels.position("232003239", filter_id_type="mmsi")
98
98
  print(f"Position: {pos.vessel_position.latitude}, {pos.vessel_position.longitude}")
99
99
 
100
- # filter_sat=True falls back to satellite AIS when no recent terrestrial position is stored.
101
- # ⚠️ Satellite lookups draw on a prepaid balance and are charged per call.
102
- # Omit it unless you need that fallback.
100
+ # filter_sat is deprecated: the satellite fallback is withdrawn in its current form.
103
101
 
104
102
  # Find vessels with an AIS position within 10 km of Rotterdam in the last 2 hours
105
103
  # (the default time window, at most 4 hours).
@@ -108,6 +106,8 @@ for v in nearby.vessels or []:
108
106
  print(f"{v.vessel_name} at {v.latitude}, {v.longitude}")
109
107
  ```
110
108
 
109
+ > **Deprecated.** The satellite fallback is withdrawn in its current form. Requests with `filter.sat=true` keep working for existing credit holders until the cutoff date and carry Deprecation and Sunset headers. From the cutoff date the parameter is accepted and ignored, the response carries a Warning header, and no credit is charged. Credit packs are no longer on sale; unspent credits are refunded on request to support@vesselapi.com. The cutoff date is given in the `Sunset` header.
110
+
111
111
  ## Search
112
112
 
113
113
  `search.vessels` accepts `q`, a unified search across IMO, MMSI, ENI, callsign and
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "vessel-api-python"
7
- version = "2.1.0"
7
+ version = "2.1.2"
8
8
  description = "Python client for the Vessel Tracking API: maritime vessel tracking, port events, emissions, and nautical infrastructure."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -1,6 +1,6 @@
1
1
  """Constants for the Vessel API Python SDK."""
2
2
 
3
- VERSION = "2.1.0"
3
+ VERSION = "2.1.2"
4
4
  DEFAULT_BASE_URL = "https://api.vesselapi.com/v1"
5
5
  DEFAULT_USER_AGENT = f"vesselapi-python/{VERSION}"
6
6
  DEFAULT_MAX_RETRIES = 3
@@ -54,8 +54,12 @@ class VesselAPIError(Exception):
54
54
  """True if the error is a 402 Payment Required response.
55
55
 
56
56
  Returned when a satellite-backed call is made with no satellite credits
57
- left. Retry without ``filter_sat`` to serve stored data instead, or top
58
- up the balance.
57
+ left. Retry without ``filter_sat`` to serve stored data instead.
58
+
59
+ .. deprecated::
60
+ The satellite fallback is withdrawn in its current form. From the
61
+ cutoff date ``filter_sat`` is ignored and no satellite request
62
+ returns 402.
59
63
  """
60
64
  return self.status_code == 402
61
65
 
@@ -75,7 +79,12 @@ class VesselAuthError(VesselAPIError):
75
79
 
76
80
 
77
81
  class VesselPaymentRequiredError(VesselAPIError):
78
- """Raised on 402 Payment Required responses (satellite credits exhausted)."""
82
+ """Raised on 402 Payment Required responses (satellite credits exhausted).
83
+
84
+ .. deprecated::
85
+ The satellite fallback is withdrawn in its current form. From the cutoff
86
+ date ``filter_sat`` is ignored and no satellite request returns 402.
87
+ """
79
88
 
80
89
 
81
90
  class VesselForbiddenError(VesselAPIError):
@@ -127,7 +127,11 @@ class VesselResponse(_Base):
127
127
 
128
128
 
129
129
  class VesselPosition(_Base):
130
- """A real-time vessel position record from AIS data."""
130
+ """A real-time vessel position record from AIS data.
131
+
132
+ ``suspected_glitch`` is true when the move from the previous clean report
133
+ implies a speed over 500 knots.
134
+ """
131
135
 
132
136
  cog: float | None = None
133
137
  heading: int | None = None
@@ -145,7 +149,7 @@ class VesselPosition(_Base):
145
149
 
146
150
 
147
151
  class PreviousPosition(_Base):
148
- """The vessel's newest position report before the served one."""
152
+ """The vessel's newest position report before the returned one."""
149
153
 
150
154
  latitude: float | None = None
151
155
  longitude: float | None = None
@@ -153,9 +157,14 @@ class PreviousPosition(_Base):
153
157
 
154
158
 
155
159
  class PositionCheck(_Base):
156
- """How the served position compares with the vessel's previous position report.
157
-
158
- Only ``lookback_hours`` is present when no previous report falls within it.
160
+ """How the returned position compares with the vessel's previous position report.
161
+
162
+ ``lookback_hours`` is always present. ``identity_match`` is present only when a
163
+ vessel record exists and an identifier can be compared. It is true when the
164
+ returned position's identifiers match those in the record. The other fields
165
+ need a previous report within ``lookback_hours``. ``exceeds_typical_speed`` is
166
+ true when the implied speed exceeds the vessel's usual top speed (99th
167
+ percentile of its recent speeds).
159
168
  """
160
169
 
161
170
  previous_position: PreviousPosition | None = None
@@ -171,7 +180,9 @@ class PositionCheck(_Base):
171
180
  class VesselPositionResponse(_Base):
172
181
  """Response for a single vessel position lookup.
173
182
 
174
- ``vessel`` and ``vessel_eta`` are ``None`` when the API holds no record for them.
183
+ ``vessel`` is ``None`` when no vessel record exists. ``vessel_eta`` is ``None``
184
+ when no destination or ETA is available, including when the lookup does not
185
+ finish in time.
175
186
  """
176
187
 
177
188
  vessel_position: VesselPosition | None = Field(default=None, alias="vesselPosition")
@@ -109,6 +109,13 @@ class VesselsService:
109
109
  sets how old a satellite fix may be and still be returned.
110
110
  ``filter_sat_max_age_minutes`` (15 to 4800, default 60, paid plans only) sets how
111
111
  old a stored position may be before a satellite lookup is made.
112
+
113
+ .. deprecated::
114
+ ``filter_sat``, ``filter_sat_lookback_minutes`` and
115
+ ``filter_sat_max_age_minutes`` are deprecated. The satellite fallback
116
+ is withdrawn in its current form. From the cutoff date in the
117
+ ``Sunset`` header they are accepted and ignored and no credit is
118
+ charged.
112
119
  """
113
120
  r = self._client.get(
114
121
  f"/vessel/{vessel_id}/position",
@@ -1593,6 +1600,13 @@ class AsyncVesselsService:
1593
1600
  sets how old a satellite fix may be and still be returned.
1594
1601
  ``filter_sat_max_age_minutes`` (15 to 4800, default 60, paid plans only) sets how
1595
1602
  old a stored position may be before a satellite lookup is made.
1603
+
1604
+ .. deprecated::
1605
+ ``filter_sat``, ``filter_sat_lookback_minutes`` and
1606
+ ``filter_sat_max_age_minutes`` are deprecated. The satellite fallback
1607
+ is withdrawn in its current form. From the cutoff date in the
1608
+ ``Sunset`` header they are accepted and ignored and no credit is
1609
+ charged.
1596
1610
  """
1597
1611
  r = await self._client.get(
1598
1612
  f"/vessel/{vessel_id}/position",