python-epo-ops-client 4.2.0__tar.gz → 4.2.1__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.
Files changed (42) hide show
  1. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/CHANGELOG.md +4 -0
  2. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/PKG-INFO +2 -2
  3. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/docs/authors.md +5 -0
  4. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/docs/release.md +1 -1
  5. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/epo_ops/api.py +5 -4
  6. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/epo_ops/models.py +8 -12
  7. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/python_epo_ops_client.egg-info/PKG-INFO +2 -2
  8. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/python_epo_ops_client.egg-info/requires.txt +1 -1
  9. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/setup.py +1 -1
  10. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/LICENSE +0 -0
  11. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/MANIFEST.in +0 -0
  12. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/Makefile +0 -0
  13. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/README.md +0 -0
  14. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/docs/backlog.md +0 -0
  15. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/docs/contributing.md +0 -0
  16. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/docs/sandbox.md +0 -0
  17. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/epo_ops/__init__.py +0 -0
  18. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/epo_ops/__version__.py +0 -0
  19. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/epo_ops/exceptions.py +0 -0
  20. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/epo_ops/middlewares/__init__.py +0 -0
  21. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/epo_ops/middlewares/cache/__init__.py +0 -0
  22. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/epo_ops/middlewares/cache/dogpile/__init__.py +0 -0
  23. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/epo_ops/middlewares/cache/dogpile/dogpile.py +0 -0
  24. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/epo_ops/middlewares/cache/dogpile/helpers.py +0 -0
  25. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/epo_ops/middlewares/middleware.py +0 -0
  26. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/epo_ops/middlewares/throttle/__init__.py +0 -0
  27. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/epo_ops/middlewares/throttle/storages/__init__.py +0 -0
  28. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/epo_ops/middlewares/throttle/storages/sqlite.py +0 -0
  29. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/epo_ops/middlewares/throttle/storages/storage.py +0 -0
  30. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/epo_ops/middlewares/throttle/throttler.py +0 -0
  31. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/epo_ops/middlewares/throttle/utils.py +0 -0
  32. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/epo_ops/utils.py +0 -0
  33. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/pyproject.toml +0 -0
  34. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/python_epo_ops_client.egg-info/SOURCES.txt +0 -0
  35. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/python_epo_ops_client.egg-info/dependency_links.txt +0 -0
  36. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/python_epo_ops_client.egg-info/not-zip-safe +0 -0
  37. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/python_epo_ops_client.egg-info/top_level.txt +0 -0
  38. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/setup.cfg +0 -0
  39. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/tests/test_api.py +0 -0
  40. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/tests/test_models.py +0 -0
  41. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/tests/test_ops_quota.py +0 -0
  42. {python_epo_ops_client-4.2.0 → python_epo_ops_client-4.2.1}/tests/test_utils.py +0 -0
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.2.1 (2025-09-09)
4
+
5
+ - Made network timeout configurable. Thanks, @ofipify.
6
+
3
7
  ## 4.2.0 (2025-07-26)
4
8
 
5
9
  - Added support for the "legal" service endpoint, providing legal status
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-epo-ops-client
3
- Version: 4.2.0
3
+ Version: 4.2.1
4
4
  Summary: Python client for EPO OPS, the European Patent Office's Open Patent Services API.
5
5
  Home-page: https://github.com/ip-tools/python-epo-ops-client
6
6
  Download-URL: https://pypi.org/project/python-epo-ops-client/#files
@@ -38,7 +38,7 @@ Requires-Dist: wheel<1; extra == "develop"
38
38
  Provides-Extra: test
39
39
  Requires-Dist: pytest<9; extra == "test"
40
40
  Requires-Dist: pytest-cache<2; extra == "test"
41
- Requires-Dist: pytest-cov<6.3; extra == "test"
41
+ Requires-Dist: pytest-cov<7.1; extra == "test"
42
42
  Requires-Dist: python-dotenv<1.2; extra == "test"
43
43
  Requires-Dist: responses<0.26; extra == "test"
44
44
  Dynamic: author
@@ -13,12 +13,17 @@ thank you so much. The list is alphabetically sorted.
13
13
 
14
14
  ## Contributors
15
15
 
16
+ - [Alejandro Marti](https://github.com/MartiONE)
16
17
  - [Alexander Meinhardt Scheurer](https://github.com/BeneCollyridam)
17
18
  - [Daniel Blasco](https://github.com/dablak)
19
+ - [Dan Bolser](https://github.com/CholoTook)
18
20
  - [fe60](https://github.com/fe60)
19
21
  - [Felipe Eltermann](https://github.com/eltermann)
20
22
  - [Geoffrey Cline](https://github.com/geoffcline)
21
23
  - [Hiro Kobashi](https://github.com/kobaski)
24
+ - [Matt Keanny](https://github.com/mattkeanny)
22
25
  - [Mike Matheson](https://github.com/mmath)
26
+ - [Oliver Fuerst](https://github.com/ofipify)
23
27
  - [Roberto Faga](https://github.com/rfaga)
28
+ - [Sebastian Vilstrup](https://github.com/ipr-sv)
24
29
  - [Sotiris Fragkiskos](https://github.com/sfranky)
@@ -15,5 +15,5 @@ To release the package, exercise those steps:
15
15
 
16
16
  - Push to remote.
17
17
  ```shell
18
- git push --follow-tags
18
+ git push && git push --tags
19
19
  ```
@@ -11,7 +11,6 @@ from requests.exceptions import HTTPError
11
11
  from . import exceptions
12
12
  from .middlewares import Throttler
13
13
  from .models import (
14
- NETWORK_TIMEOUT,
15
14
  AccessToken,
16
15
  Docdb,
17
16
  Epodoc,
@@ -21,6 +20,7 @@ from .models import (
21
20
 
22
21
  log = logging.getLogger(__name__)
23
22
 
23
+ DEFAULT_NETWORK_TIMEOUT = 10.0
24
24
 
25
25
  class Client(object):
26
26
  __auth_url__ = "https://ops.epo.org/3.2/auth/accesstoken"
@@ -35,14 +35,15 @@ class Client(object):
35
35
  __register_path__ = "register"
36
36
  __register_search_path__ = "register/search"
37
37
 
38
- def __init__(self, key, secret, accept_type="xml", middlewares=None):
38
+ def __init__(self, key, secret, accept_type="xml", middlewares=None, timeout=DEFAULT_NETWORK_TIMEOUT):
39
39
  self.accept_type = "application/{0}".format(accept_type)
40
40
  self.middlewares = middlewares
41
41
  if middlewares is None:
42
42
  self.middlewares = [Throttler()]
43
- self.request = Request(self.middlewares)
43
+ self.request = Request(self.middlewares, timeout)
44
44
  self.key = key
45
45
  self.secret = secret
46
+ self.timeout = timeout
46
47
  self._access_token = None
47
48
 
48
49
  def family(
@@ -351,7 +352,7 @@ class Client(object):
351
352
  self.__auth_url__,
352
353
  headers=headers,
353
354
  data=payload,
354
- timeout=NETWORK_TIMEOUT,
355
+ timeout=self.timeout,
355
356
  )
356
357
  response.raise_for_status()
357
358
  self._access_token = AccessToken(response)
@@ -10,10 +10,6 @@ from .utils import quote, validate_date
10
10
 
11
11
  log = logging.getLogger(__name__)
12
12
 
13
-
14
- NETWORK_TIMEOUT = 10.0
15
-
16
-
17
13
  def _prepare_part(part):
18
14
  return "({0})".format(quote(part))
19
15
 
@@ -68,8 +64,9 @@ class AccessToken(object):
68
64
 
69
65
 
70
66
  class Request(object):
71
- def __init__(self, middlewares):
67
+ def __init__(self, middlewares, timeout=None):
72
68
  self.middlewares = middlewares
69
+ self.timeout = timeout
73
70
  self.reset_env()
74
71
 
75
72
  @property
@@ -86,10 +83,10 @@ class Request(object):
86
83
  self.env.update(self.default_env)
87
84
 
88
85
  def post(self, url, data=None, **kwargs):
89
- return self._request(_post_callback, url, data, **kwargs)
86
+ return self._request(self._post_callback, url, data, **kwargs)
90
87
 
91
88
  def get(self, url, data=None, **kwargs):
92
- return self._request(_get_callback, url, data, **kwargs)
89
+ return self._request(self._get_callback, url, data, **kwargs)
93
90
 
94
91
  def _request(self, callback, url, data=None, **kwargs):
95
92
  self.reset_env()
@@ -111,9 +108,8 @@ class Request(object):
111
108
  return response
112
109
 
113
110
 
114
- def _post_callback(url, data, **kwargs):
115
- return requests.post(url, data, **kwargs, timeout=NETWORK_TIMEOUT)
116
-
111
+ def _post_callback(self, url, data, **kwargs):
112
+ return requests.post(url, data, **kwargs, timeout=self.timeout)
117
113
 
118
- def _get_callback(url, data, **kwargs):
119
- return requests.get(url, **kwargs, timeout=NETWORK_TIMEOUT)
114
+ def _get_callback(self, url, data, **kwargs):
115
+ return requests.get(url, **kwargs, timeout=self.timeout)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-epo-ops-client
3
- Version: 4.2.0
3
+ Version: 4.2.1
4
4
  Summary: Python client for EPO OPS, the European Patent Office's Open Patent Services API.
5
5
  Home-page: https://github.com/ip-tools/python-epo-ops-client
6
6
  Download-URL: https://pypi.org/project/python-epo-ops-client/#files
@@ -38,7 +38,7 @@ Requires-Dist: wheel<1; extra == "develop"
38
38
  Provides-Extra: test
39
39
  Requires-Dist: pytest<9; extra == "test"
40
40
  Requires-Dist: pytest-cache<2; extra == "test"
41
- Requires-Dist: pytest-cov<6.3; extra == "test"
41
+ Requires-Dist: pytest-cov<7.1; extra == "test"
42
42
  Requires-Dist: python-dotenv<1.2; extra == "test"
43
43
  Requires-Dist: responses<0.26; extra == "test"
44
44
  Dynamic: author
@@ -16,6 +16,6 @@ ruff<0.13
16
16
  [test]
17
17
  pytest<9
18
18
  pytest-cache<2
19
- pytest-cov<6.3
19
+ pytest-cov<7.1
20
20
  python-dotenv<1.2
21
21
  responses<0.26
@@ -42,7 +42,7 @@ setup(
42
42
  "test": [
43
43
  "pytest<9",
44
44
  "pytest-cache<2",
45
- "pytest-cov<6.3",
45
+ "pytest-cov<7.1",
46
46
  "python-dotenv<1.2",
47
47
  "responses<0.26",
48
48
  ],