Skip to main content

Python SDK for the RiskScore CVE API (api.riskscore.dev)

Project description

riskscore — Python SDK

Python client for the RiskScore API — composite CVE risk scores combining CVSS, EPSS, and CISA KEV into a single 0–100 signal.

Free tier: 100 requests/day. No credit card required.

Installation

pip install riskscore

First API Call (under 10 lines)

from riskscore import RiskScoreClient

client = RiskScoreClient(api_key="YOUR_API_KEY")
result = client.get_cve("CVE-2021-44228")
print(result["cve_id"], result["risk_score"]["score"], result["risk_score"]["severity_label"])
# CVE-2021-44228 100 CRITICAL

Get your free API key at riskscore.dev — no credit card, takes 30 seconds.

Usage Examples

1. Single CVE Lookup

from riskscore import RiskScoreClient

client = RiskScoreClient(api_key="YOUR_API_KEY")

cve = client.get_cve("CVE-2021-44228")
print(cve["cve_id"])                        # CVE-2021-44228
print(cve["risk_score"]["score"])           # 100
print(cve["risk_score"]["severity_label"])  # CRITICAL

2. Bulk Scoring

Score multiple CVEs in a single request (free tier: 10 per call, Pro/Enterprise: 100):

from riskscore import RiskScoreClient

client = RiskScoreClient(api_key="YOUR_API_KEY")

results = client.bulk_score([
    "CVE-2021-44228",
    "CVE-2022-26134",
    "CVE-2023-44487",
    "CVE-2024-3400",
    "CVE-2021-45046",
])

for item in results:
    print(f"{item['cve_id']:20s}  score={item['risk_score']['score']:3d}  severity={item['risk_score']['severity_label']}")

3. Explain Mode

Get a score breakdown plus a plain-English explanation of what's driving the risk:

from riskscore import RiskScoreClient

client = RiskScoreClient(api_key="YOUR_API_KEY")

cve = client.get_cve("CVE-2021-44228", explain=True)

# Component breakdown
components = cve["risk_score"]["components"]
print(f"CVSS:  {components['cvss_score']}{components['cvss_contribution']} pts")
print(f"EPSS:  {components['epss_score']}{components['epss_contribution']} pts")
print(f"KEV:   {'yes' if components['kev_listed'] else 'no'}{components['kev_contribution']} pts")

# Plain English
if "explanation" in cve:
    print("\n" + cve["explanation"]["plain_english"])

All Available Methods

get_cve(cve_id, explain=False)

Look up a single CVE by ID.

bulk_score(cve_ids, explain=False)

Score multiple CVEs in one request.

search(keyword=None, vendor=None, kev=None, cvss_min=None, page=1, per_page=20)

Search and filter CVEs.

results = client.search(keyword="log4j", kev=True, per_page=5)
for r in results["results"]:
    print(r["cve_id"], r["risk_score"])

watchlist_add(cve_id) / watchlist_get(changed_only=False) / watchlist_remove(cve_id)

Manage your CVE watchlist.

me()

View your key tier, limits, and daily usage.

rate_limit_status()

Check remaining quota for the current time window.

Error Handling

from riskscore import RiskScoreClient, RiskScoreError

client = RiskScoreClient(api_key="YOUR_API_KEY")

try:
    cve = client.get_cve("CVE-INVALID-9999")
except RiskScoreError as e:
    print(e.status_code, e)

Free Tier

Plan Requests/day Bulk limit
Free 100 10 CVEs
Pro 10,000 100 CVEs
Enterprise Unlimited 1,000 CVEs

No credit card required for the free tier.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

riskscore_api-0.1.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

riskscore_api-0.1.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file riskscore_api-0.1.1.tar.gz.

File metadata

  • Download URL: riskscore_api-0.1.1.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for riskscore_api-0.1.1.tar.gz
Algorithm Hash digest
SHA256 059a0bed04011d0215fdf6971779f16881a631caa719d87d8de3dea5351a379f
MD5 e44de24d8c5ede6fceafd2bdac8e4f11
BLAKE2b-256 326956762707858a5cd08859b36136a636c81148455c08d5f23c363fe35790e3

See more details on using hashes here.

File details

Details for the file riskscore_api-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: riskscore_api-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for riskscore_api-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e205f83926ce52e84f40ebef81fb09da2db07eeb30c0e1326b5f4b27e63514a9
MD5 310680b1ffb1d1f7039a32a8ce3343d1
BLAKE2b-256 781c0ee85ca6e6bb38f2ae6df77202c54c4824b4071c5074da7cfa82cf278e3a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page