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
# 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="2021-01-01",
publish_end_date="2021-12-31"
)
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file nvd_client-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: nvd_client-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 284a59e4247a6229fedf479ab525d75543a5b640e977e7c5d162dc36b470ed7c |
|
MD5 | 7cca58805443e2edc90f0f73f66c70f9 |
|
BLAKE2b-256 | 303ab290153f4b13a19252682263acb080622d88f03df6c7e88c409ff20c289e |