Skip to content

Commit ebe2afd

Browse files
committed
Build Release 2.41.0 (2025-12-02)
* 15d0042 - Add optional timeout parameter to requests (#146)
1 parent 15d0042 commit ebe2afd

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

HISTORY.rst

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,26 @@
33
History
44
=======
55

6-
2.41.0 (2025-11-25)
6+
2.41.0 (2025-12-02)
77
-------------------
88

9-
* Add `gapipy.exceptions.TimeoutError` which can be raised when the `timeout` parameter is passed to `Query.get`
9+
* Add `gapipy.exceptions.TimeoutError`, which can be raised when the optional
10+
`timeout` parameter is passed to `Query.get`. Without providing the `timeout`
11+
parameter, the default behaviour remains unchanged, where a `requests`
12+
Timeout exception is raised.
13+
* See `PR #146`_ for more details.
14+
15+
.. code-block:: python
16+
17+
from gapipy import Client
18+
19+
gapi = Client(application_key="your_api_key")
20+
try:
21+
departure_service = gapi.departure_services.get(123456, timeout=1)
22+
except gapi.exceptions.TimeoutError:
23+
# handle exception
24+
else:
25+
... # success
1026
1127
.. _`PR #146`: https://github.com/gadventures/gapipy/pull/146
1228

0 commit comments

Comments
 (0)