security.dev Python SDK
A modern Python client for the security.dev API, built using httpx and pydantic. Supports both synchronous (default) and asynchronous usage.
Features
- Synchronous and Asynchronous interfaces.
- Data validation using
pydantic. - Simple and intuitive interface.
- Type-hinted.
Installation
Install using pip (or any other manager):
pip install securitydev
Requirements
- Python 3.8+
- A security.dev API key, available from security.dev.
Quick Examples
Synchronous Usage
import os
from securitydev import SecurityClient
key = os.getenv("SECURITYDEV_KEY")
with SecurityClient(key=key) as client:
reputation = client.ip_intel.reputation("8.8.8.8")
print(f"8.8.8.8 - Is Abuser: {reputation.is_abuser}")
You don't necessarily need to use the context manager.
import os
from securitydev import SecurityClient
key = os.getenv("SECURITYDEV_KEY")
client = SecurityClient(key=key)
ip = "1.1.1.1"
rep = client.ip_intel.reputation(ip)
if rep.is_tor_exit:
print(f"{ip} is a Tor exit.")
Asynchronous Usage
import os
import asyncio
from securitydev import AsyncSecurityClient
async def main():
async with AsyncSecurityClient(key=os.getenv("SECURITYDEV_KEY")) as client:
geoip = await client.ip_intel.geolocate("1.1.1.1")
print(f"1.1.1.1 - Country: {geoip.country.name}")
asyncio.run(main())
Metadata
Release files for securitydev 1.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| securitydev-1.0.6.tar.gz | 22.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| securitydev-1.0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.8 kB
Release files / securitydev-1.0.6.tar.gz
| Download URL | securitydev-1.0.6.tar.gz |
|---|---|
| Size | 22.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
258fd3923a4ddbb0dca05e952a7b848a2080767c122a3668796246d44e568e4d
|
|
BLAKE2b-256 checksum How to use checksums |
764836be7f994ab24cd4454c28414d6e81b1431a97bddf1502e5d42f1ca79e09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.3
|
Release files / securitydev-1.0.6-py3-none-any.whl
| Download URL | securitydev-1.0.6-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6abb56872826021f910b864a8f2922d8bce875bba98d3028cf1b1d0002eb4e96
|
|
BLAKE2b-256 checksum How to use checksums |
196fe9a659553fc216a1cb32052cecd6ce3350239eaf79442cd511db128868f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.3
|
Security for securitydev 1.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.