A Python client for interacting with the National Vulnerability Database (NVD) API to fetch CVE data.
Project description
NVD API Client
A Python client for interacting with the National Vulnerability Database (NVD) API to fetch CVE data.
Features
- Fetch all CVEs with pagination
- Fetch CVE by its ID
- Fetch CVEs by publication or modification date
- Fetch CVEs by CPE name
- Other features coming soon...
Installation
You can install the package using pip:
pip install nvd_client
Usage
from nvd_client import NvdApi
from datetime import datetime, timedelta
# Initialize the API client
api_key = "your_api_key_here"
nvd_api = NvdApi(api_key)
# Fetch all CVEs
cves = nvd_api.get_all_cves(per_page=100, offset=0)
print(cves)
# Fetch a CVE by ID
cve = nvd_api.get_cve_by_id(cve_id="CVE-2024-30078")
print(cve)
# Fetch CVEs by publish or modify date range
cves_by_date = nvd_api.get_cve_by_date(
per_page=100,
offset=0,
publish_start_date=datetime.now() - timedelta(days=2),
publish_end_date=datetime.now()
)
print(cves_by_date)
# Fetch CVEs by CPE name
cves_by_cpe = nvd_api.get_cve_by_cpe(
cpe_name="cpe:2.3:o:microsoft:windows_10:1607:*:*:*:*:*:*:*",
per_page=100,
offset=0
)
print(cves_by_cpe)
Author
-
Author: Ahur4
-
Telegram: @Ahura_rahmani
License
This project is licensed under the MIT License. See the LICENSE file for details.
Explanation:
- Features: Lists the main functionalities provided by the module.
- Installation: Provides instructions for installing the package using pip from PyPI.
- Usage: Gives examples of how to initialize the client and use its methods.
- Author: Provides your name and a link to your Telegram channel.
- License: States that the project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nvd_client-0.1.3.2.tar.gz.
File metadata
- Download URL: nvd_client-0.1.3.2.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aafe01cf3fc0bea5c32dd7fd9101de93dba2689a248f9a59640629cbce4f1498
|
|
| MD5 |
dd615b13554f403b8e57dee4d44c19b4
|
|
| BLAKE2b-256 |
b2e169c92511aea2bc4e6ef2974efe8304c1235b2f12eae877a2b38b2b0adfa2
|
File details
Details for the file nvd_client-0.1.3.2-py3-none-any.whl.
File metadata
- Download URL: nvd_client-0.1.3.2-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06df481a00126a98164d688eb68bd07e1e92bd264ce344e7912982234e96f70a
|
|
| MD5 |
56a05fd64e812ad52f580ba9196a52fd
|
|
| BLAKE2b-256 |
601f0271a7fa15b55e8c63f838a94ce6572c1e3673e584143d336ad6418aab5b
|