nvd-client


Namenvd-client JSON
Version 0.1.3.2 PyPI version JSON
download
home_pagehttps://github.com/ahur4/nvd-client
SummaryA Python client for interacting with the National Vulnerability Database (NVD) API to fetch CVE data.
upload_time2025-10-18 10:51:14
maintainerNone
docs_urlNone
authorAhur4
requires_python>=3.6
licenseNone
keywords vulnerability nvd national vulnerability database nvd_client nvd_client-api ahur4 ahura rahmani redteam soc vulnerability assessment penetration testing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# NVD API Client

![PyPI](https://img.shields.io/pypi/v/nvd-client)
![Daily Downloads](https://img.shields.io/pypi/dd/nvd-client)
![Monthly Downloads](https://img.shields.io/pypi/dm/nvd-client)
[![Telegram-Channel](https://img.shields.io/badge/Telegram--Channel-Ahura_Rahmani-blue)](https://t.me/Ahur4_Rahmani)


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:

```sh
pip install nvd_client
```

## Usage

```python
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](https://t.me/Ahura_rahmani)

## License

This project is licensed under the MIT License. See the `LICENSE` file for details.


### Explanation:
1. **Features**: Lists the main functionalities provided by the module.
2. **Installation**: Provides instructions for installing the package using pip from PyPI.
3. **Usage**: Gives examples of how to initialize the client and use its methods.
4. **Author**: Provides your name and a link to your Telegram channel.
5. **License**: States that the project is licensed under the MIT License.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ahur4/nvd-client",
    "name": "nvd-client",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "vulnerability, nvd, national vulnerability database, nvd_client, nvd_client-api, ahur4, ahura rahmani, redteam, soc, vulnerability assessment, penetration testing",
    "author": "Ahur4",
    "author_email": "ahur4.rahmani@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/b2/e1/69c92511aea2bc4e6ef2974efe8304c1235b2f12eae877a2b38b2b0adfa2/nvd_client-0.1.3.2.tar.gz",
    "platform": null,
    "description": "\n# NVD API Client\n\n![PyPI](https://img.shields.io/pypi/v/nvd-client)\n![Daily Downloads](https://img.shields.io/pypi/dd/nvd-client)\n![Monthly Downloads](https://img.shields.io/pypi/dm/nvd-client)\n[![Telegram-Channel](https://img.shields.io/badge/Telegram--Channel-Ahura_Rahmani-blue)](https://t.me/Ahur4_Rahmani)\n\n\nA Python client for interacting with the National Vulnerability Database (NVD) API to fetch CVE data.\n\n## Features\n\n- Fetch all CVEs with pagination\n- Fetch CVE by its ID\n- Fetch CVEs by publication or modification date\n- Fetch CVEs by CPE name\n- Other features coming soon...\n\n## Installation\n\nYou can install the package using pip:\n\n```sh\npip install nvd_client\n```\n\n## Usage\n\n```python\nfrom nvd_client import NvdApi\nfrom datetime import datetime, timedelta\n\n# Initialize the API client\napi_key = \"your_api_key_here\"\nnvd_api = NvdApi(api_key)\n\n# Fetch all CVEs\ncves = nvd_api.get_all_cves(per_page=100, offset=0)\nprint(cves)\n\n# Fetch a CVE by ID\ncve = nvd_api.get_cve_by_id(cve_id=\"CVE-2024-30078\")\nprint(cve)\n\n# Fetch CVEs by publish or modify date range\ncves_by_date = nvd_api.get_cve_by_date(\n    per_page=100,\n    offset=0,\n    publish_start_date=datetime.now() - timedelta(days=2),\n    publish_end_date=datetime.now()\n)\nprint(cves_by_date)\n\n# Fetch CVEs by CPE name\ncves_by_cpe = nvd_api.get_cve_by_cpe(\n    cpe_name=\"cpe:2.3:o:microsoft:windows_10:1607:*:*:*:*:*:*:*\",\n    per_page=100,\n    offset=0\n)\nprint(cves_by_cpe)\n```\n\n## Author\n\n- Author: Ahur4\n\n- Telegram: [@Ahura_rahmani](https://t.me/Ahura_rahmani)\n\n## License\n\nThis project is licensed under the MIT License. See the `LICENSE` file for details.\n\n\n### Explanation:\n1. **Features**: Lists the main functionalities provided by the module.\n2. **Installation**: Provides instructions for installing the package using pip from PyPI.\n3. **Usage**: Gives examples of how to initialize the client and use its methods.\n4. **Author**: Provides your name and a link to your Telegram channel.\n5. **License**: States that the project is licensed under the MIT License.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Python client for interacting with the National Vulnerability Database (NVD) API to fetch CVE data.",
    "version": "0.1.3.2",
    "project_urls": {
        "Homepage": "https://github.com/ahur4/nvd-client"
    },
    "split_keywords": [
        "vulnerability",
        " nvd",
        " national vulnerability database",
        " nvd_client",
        " nvd_client-api",
        " ahur4",
        " ahura rahmani",
        " redteam",
        " soc",
        " vulnerability assessment",
        " penetration testing"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "601f0271a7fa15b55e8c63f838a94ce6572c1e3673e584143d336ad6418aab5b",
                "md5": "56a05fd64e812ad52f580ba9196a52fd",
                "sha256": "06df481a00126a98164d688eb68bd07e1e92bd264ce344e7912982234e96f70a"
            },
            "downloads": -1,
            "filename": "nvd_client-0.1.3.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "56a05fd64e812ad52f580ba9196a52fd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 6812,
            "upload_time": "2025-10-18T10:51:13",
            "upload_time_iso_8601": "2025-10-18T10:51:13.044778Z",
            "url": "https://files.pythonhosted.org/packages/60/1f/0271a7fa15b55e8c63f838a94ce6572c1e3673e584143d336ad6418aab5b/nvd_client-0.1.3.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b2e169c92511aea2bc4e6ef2974efe8304c1235b2f12eae877a2b38b2b0adfa2",
                "md5": "dd615b13554f403b8e57dee4d44c19b4",
                "sha256": "aafe01cf3fc0bea5c32dd7fd9101de93dba2689a248f9a59640629cbce4f1498"
            },
            "downloads": -1,
            "filename": "nvd_client-0.1.3.2.tar.gz",
            "has_sig": false,
            "md5_digest": "dd615b13554f403b8e57dee4d44c19b4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 6261,
            "upload_time": "2025-10-18T10:51:14",
            "upload_time_iso_8601": "2025-10-18T10:51:14.321766Z",
            "url": "https://files.pythonhosted.org/packages/b2/e1/69c92511aea2bc4e6ef2974efe8304c1235b2f12eae877a2b38b2b0adfa2/nvd_client-0.1.3.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-18 10:51:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ahur4",
    "github_project": "nvd-client",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "nvd-client"
}
        
Elapsed time: 2.49687s