py-euvd 0.2.2__tar.gz → 0.2.3__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.
- {py_euvd-0.2.2 → py_euvd-0.2.3}/CHANGELOG.md +4 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/PKG-INFO +4 -2
- {py_euvd-0.2.2 → py_euvd-0.2.3}/README.md +2 -0
- py_euvd-0.2.3/pyeuvd/_version.py +1 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/pyeuvd/models/page.py +10 -2
- {py_euvd-0.2.2 → py_euvd-0.2.3}/pyproject.toml +12 -1
- {py_euvd-0.2.2 → py_euvd-0.2.3}/tests/test_models.py +9 -3
- py_euvd-0.2.2/pyeuvd/_version.py +0 -1
- {py_euvd-0.2.2 → py_euvd-0.2.3}/.gitignore +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/LICENSE +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/NOTICE +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/pyeuvd/__init__.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/pyeuvd/async_client.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/pyeuvd/base_client.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/pyeuvd/client.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/pyeuvd/constants.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/pyeuvd/errors.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/pyeuvd/filters.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/pyeuvd/models/__init__.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/pyeuvd/models/advisory.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/pyeuvd/models/advisory_detail.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/pyeuvd/models/kev_entry.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/pyeuvd/models/model.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/pyeuvd/models/product.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/pyeuvd/models/record.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/pyeuvd/models/source_record.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/pyeuvd/models/vulnerability.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/pyeuvd/models/vulnerability_detail.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/pyeuvd/parsing.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/pyeuvd/py.typed +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/pyeuvd/response.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/pyeuvd/transports/__init__.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/pyeuvd/transports/async_transport.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/pyeuvd/transports/threaded_transport.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/pyeuvd/transports/transport.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/pyeuvd/transports/urllib_transport.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/pyeuvd/utils.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/tests/__init__.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/tests/conftest.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/tests/fakes.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/tests/fixtures/advisory.json +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/tests/fixtures/cve_mapping.csv +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/tests/fixtures/exploited.json +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/tests/fixtures/kev.json +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/tests/fixtures/latest.json +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/tests/fixtures/search.json +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/tests/fixtures/vulnerability.json +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/tests/server.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/tests/test_async_client.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/tests/test_client.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/tests/test_live.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/tests/test_parsing.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/tests/test_response.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/tests/test_transports.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/tests/test_urllib_transport.py +0 -0
- {py_euvd-0.2.2 → py_euvd-0.2.3}/tests/test_utils.py +0 -0
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.3 (2026-11-27)
|
|
4
|
+
|
|
5
|
+
- A search result without a usable `total` now raises `EUVDError`. Before, `iter_search` stopped after the first page without an error, and a `total` of `NaN` raised `ValueError`.
|
|
6
|
+
|
|
3
7
|
## 0.2.2 (2026-11-27)
|
|
4
8
|
|
|
5
9
|
- Security: the built-in transport no longer follows a redirect to an `ftp://` address. The request fails with an `APIError` instead.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: py-euvd
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Summary: Dependency-free Python client for the EU Vulnerability Database (EUVD) API
|
|
5
5
|
Project-URL: Documentation, https://py-euvd.spoons.fyi
|
|
6
6
|
Project-URL: Repository, https://github.com/dmuhs/py-euvd
|
|
@@ -10,7 +10,7 @@ Author: Dominik Muhs
|
|
|
10
10
|
License-Expression: Apache-2.0
|
|
11
11
|
License-File: LICENSE
|
|
12
12
|
License-File: NOTICE
|
|
13
|
-
Keywords: cve,enisa,euvd,security,vulnerability
|
|
13
|
+
Keywords: api-client,cve,cvss,enisa,epss,euvd,kev,security,vulnerability,vulnerability-database
|
|
14
14
|
Classifier: Development Status :: 4 - Beta
|
|
15
15
|
Classifier: Intended Audience :: Developers
|
|
16
16
|
Classifier: Intended Audience :: Information Technology
|
|
@@ -33,6 +33,8 @@ Description-Content-Type: text/markdown
|
|
|
33
33
|
|
|
34
34
|
A Python client for the [EU Vulnerability Database](https://euvd.enisa.europa.eu) (EUVD), run by ENISA.
|
|
35
35
|
|
|
36
|
+
Look up entries by EUVD or CVE ID, search by vendor, product, CVSS score, EPSS score or date, and download the Known Exploited Vulnerabilities (KEV) list and the CVE to EUVD mapping.
|
|
37
|
+
|
|
36
38
|
**Documentation: [py-euvd.spoons.fyi](https://py-euvd.spoons.fyi)**
|
|
37
39
|
|
|
38
40
|
- **No dependencies.** Uses only the Python standard library.
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
A Python client for the [EU Vulnerability Database](https://euvd.enisa.europa.eu) (EUVD), run by ENISA.
|
|
6
6
|
|
|
7
|
+
Look up entries by EUVD or CVE ID, search by vendor, product, CVSS score, EPSS score or date, and download the Known Exploited Vulnerabilities (KEV) list and the CVE to EUVD mapping.
|
|
8
|
+
|
|
7
9
|
**Documentation: [py-euvd.spoons.fyi](https://py-euvd.spoons.fyi)**
|
|
8
10
|
|
|
9
11
|
- **No dependencies.** Uses only the Python standard library.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.3"
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
import math
|
|
3
4
|
from collections.abc import Iterator
|
|
4
5
|
from dataclasses import dataclass, field
|
|
5
6
|
from typing import Any, Self, overload
|
|
6
7
|
|
|
8
|
+
from ..errors import EUVDError
|
|
7
9
|
from ..parsing import expect_dict, parse_number
|
|
8
10
|
from .vulnerability import Vulnerability
|
|
9
11
|
|
|
@@ -52,11 +54,17 @@ class Page:
|
|
|
52
54
|
|
|
53
55
|
@classmethod
|
|
54
56
|
def from_dict(cls, data: dict[str, Any], *, page: int, size: int) -> Self:
|
|
55
|
-
"""Build a page from the JSON of the search endpoint.
|
|
57
|
+
"""Build a page from the JSON of the search endpoint.
|
|
58
|
+
|
|
59
|
+
Raises ``EUVDError`` if it holds no total.
|
|
60
|
+
"""
|
|
56
61
|
data = expect_dict(data)
|
|
62
|
+
total = parse_number(data.get("total"))
|
|
63
|
+
if total is None or not math.isfinite(total):
|
|
64
|
+
raise EUVDError("the search result has no total")
|
|
57
65
|
return cls(
|
|
58
66
|
items=tuple(Vulnerability.from_list(data.get("items"))),
|
|
59
|
-
total=int(
|
|
67
|
+
total=int(total),
|
|
60
68
|
page=page,
|
|
61
69
|
size=size,
|
|
62
70
|
)
|
|
@@ -8,7 +8,18 @@ license-files = ["LICENSE", "NOTICE"]
|
|
|
8
8
|
authors = [{ name = "Dominik Muhs" }]
|
|
9
9
|
requires-python = ">=3.11"
|
|
10
10
|
dependencies = []
|
|
11
|
-
keywords = [
|
|
11
|
+
keywords = [
|
|
12
|
+
"euvd",
|
|
13
|
+
"enisa",
|
|
14
|
+
"vulnerability",
|
|
15
|
+
"vulnerability-database",
|
|
16
|
+
"cve",
|
|
17
|
+
"kev",
|
|
18
|
+
"epss",
|
|
19
|
+
"cvss",
|
|
20
|
+
"security",
|
|
21
|
+
"api-client",
|
|
22
|
+
]
|
|
12
23
|
classifiers = [
|
|
13
24
|
"Development Status :: 4 - Beta",
|
|
14
25
|
"Intended Audience :: Developers",
|
|
@@ -278,13 +278,19 @@ def test_page_from_dict():
|
|
|
278
278
|
|
|
279
279
|
|
|
280
280
|
def test_page_from_dict_with_odd_data():
|
|
281
|
-
assert Page.from_dict({"total":
|
|
282
|
-
items=(), total=0, page=0, size=10
|
|
283
|
-
)
|
|
281
|
+
assert Page.from_dict({"total": 0}, page=0, size=10) == Page(items=(), total=0, page=0, size=10)
|
|
284
282
|
with pytest.raises(EUVDError):
|
|
285
283
|
Page.from_dict([], page=0, size=10)
|
|
286
284
|
|
|
287
285
|
|
|
286
|
+
@pytest.mark.parametrize("total", ["many", None, float("nan"), float("inf")])
|
|
287
|
+
def test_page_from_dict_needs_a_total(total):
|
|
288
|
+
with pytest.raises(EUVDError, match="no total"):
|
|
289
|
+
Page.from_dict({"items": [{"id": "x"}], "total": total}, page=0, size=10)
|
|
290
|
+
with pytest.raises(EUVDError, match="no total"):
|
|
291
|
+
Page.from_dict({"items": [{"id": "x"}]}, page=0, size=10)
|
|
292
|
+
|
|
293
|
+
|
|
288
294
|
def test_page_has_next():
|
|
289
295
|
item = Vulnerability.from_dict({"id": "x"})
|
|
290
296
|
|
py_euvd-0.2.2/pyeuvd/_version.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2.2"
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|