Official Python SDK for VeriBits API
Project description
VeriBits Python SDK
Official Python SDK for the VeriBits security API.
Installation
pip install veribits
Quick Start
from veribits import VeriBits
# Initialize client
client = VeriBits(api_key="your_api_key")
# Threat intelligence lookup
result = client.threat_intel.lookup("d41d8cd98f00b204e9800998ecf8427e")
print(f"Threat score: {result['threat_score']}")
# Submit file to sandbox
scan = client.sandbox.submit("/path/to/suspicious/file.exe")
print(f"Task ID: {scan['task_id']}")
# Generate SBOM for your project
sbom = client.cicd.generate_sbom(format="cyclonedx")
Features
Threat Intelligence
# Lookup hash
result = client.threat_intel.lookup("sha256_hash")
# Batch lookup
results = client.threat_intel.batch_lookup(["hash1", "hash2", "hash3"])
# Search threats
threats = client.threat_intel.search(query="ransomware", limit=10)
Malware Sandbox
# Submit file for analysis
submission = client.sandbox.submit("/path/to/file", analysis_type="full")
# Check status
status = client.sandbox.status(submission['task_id'])
# Get results
results = client.sandbox.result(submission['task_id'])
CI/CD Integration
# Generate SBOM
sbom = client.cicd.generate_sbom(format="cyclonedx")
# Scan dependencies for vulnerabilities
vulns = client.cicd.scan_dependencies("requirements.txt")
# Scan for hardcoded secrets
secrets = client.cicd.scan_secrets("./src")
Cryptographic Services
# Publish a public key
key_info = client.crypto.publish_key(pgp_key, key_type="pgp")
# Lookup a key
key = client.crypto.lookup_key("user@example.com")
# Verify signature
result = client.crypto.verify_signature(data, signature)
# Validate certificate
validation = client.crypto.validate_certificate(cert_pem)
Error Handling
from veribits import VeriBits, APIError, AuthenticationError, RateLimitError
client = VeriBits(api_key="your_api_key")
try:
result = client.threat_intel.lookup("hash")
except AuthenticationError:
print("Invalid API key")
except RateLimitError as e:
print(f"Rate limited. Retry after {e.retry_after} seconds")
except APIError as e:
print(f"API error: {e.status_code} - {e}")
Configuration
# Custom API endpoint
client = VeriBits(
api_key="your_api_key",
api_url="https://custom.veribits.com"
)
Requirements
- Python 3.8+
- requests >= 2.28.0
License
MIT License - see LICENSE for details.
Links
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
veribits-1.0.0.tar.gz
(6.9 kB
view details)
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 veribits-1.0.0.tar.gz.
File metadata
- Download URL: veribits-1.0.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1abb5d82cbbec4e295914554e8626c345320daca2f633347a9fbf54813d63341
|
|
| MD5 |
fefe6ae6d8337d5df317250519d6fee7
|
|
| BLAKE2b-256 |
5893e2d8aef9bd3966b3980618e9db39a19a9a12915e02d5a9fafe451fd504a2
|
File details
Details for the file veribits-1.0.0-py3-none-any.whl.
File metadata
- Download URL: veribits-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0eca8f69bd85b1fb58bf2c6816125697b734aff86c2bbd5fe2e0a969f3444ac2
|
|
| MD5 |
783187bce3a8c075e0b745cef2ef3623
|
|
| BLAKE2b-256 |
78c877df998fe19c6ddb1563e1456c883b652f268a5722ed8038c7724115ac9a
|