pyonyphe
Python client and command line interface for ONYPHE, the Cyber Defense Search Engine.
- Sync (
Onyphe) and async (AsyncOnyphe) clients, both fully typed. - Covers APIv2: User, Search, Export, Summary, Simple, Simple Best, the Bulk
variants, Discovery and Alert — plus a
request()escape hatch for anything ONYPHE ships next. pyonypheCLI with table / JSON / NDJSON output.- Automatic pagination, retries with backoff,
Retry-Aftersupport.
Install
uv add pyonyphe
uv run pyonyphe --help
Library
from pyonyphe import Onyphe
with Onyphe() as api: # key read from ONYPHE_API_KEY
page = api.search("category:datascan product:Nginx country:FR")
print(page.total, "results")
for hit in api.search_iter("domain:example.com", max_results=500):
print(hit["ip"], hit.get("port"))
for doc in api.export("category:vulnscan domain:example.com"):
...
Async, same surface:
import asyncio
from pyonyphe import AsyncOnyphe
async def main() -> None:
async with AsyncOnyphe() as api:
page = await api.search("protocol:rdp")
async for hit in api.export("domain:example.com"):
print(hit["ip"])
asyncio.run(main())
CLI
export ONYPHE_API_KEY=...
pyonyphe user
pyonyphe search 'protocol:rdp country:FR' --size 20
pyonyphe search 'domain:example.com' --all --format ndjson -o results.ndjson
pyonyphe export 'category:vulnscan domain:example.com' -o export.ndjson
pyonyphe summary ip 8.8.8.8
pyonyphe simple whois 8.8.8.8 --best
pyonyphe resolve example.com
pyonyphe bulk simple datascan ips.txt -o out.ndjson
pyonyphe alert list
Configuration
The API key is resolved in this order:
api_key=argument, or--api-keyon the CLI- the
ONYPHE_API_KEYenvironment variable ~/.config/pyonyphe/config.toml~/.onyphe.ini— the file used by the official ONYPHE CLI
# ~/.config/pyonyphe/config.toml
[onyphe]
api_key = "..."
Docker
The CLI is published as a container image on GHCR, built for linux/amd64
and linux/arm64:
docker run --rm -e ONYPHE_API_KEY ghcr.io/onyphe/pyonyphe:latest \
search 'category:datascan product:Nginx country:FR' --size 5
Tags: latest and the semver ones (3, 3.0, 3.0.0) on each release,
main and sha-<commit> on every push to the default branch.
The image runs as an unprivileged user and its working directory is /work,
so mount there to read an asset list or write an export:
docker run --rm -e ONYPHE_API_KEY -v "$PWD:/work" ghcr.io/onyphe/pyonyphe:latest \
bulk simple datascan ips.txt -o datascan.ndjson
MCP server
An optional MCP server exposes ONYPHE to an assistant:
uv add 'pyonyphe[mcp]'
ONYPHE_API_KEY=... pyonyphe-mcp
Four read-only tools — search, summary, resolve, user — with clamped
page sizes and truncated fields, so a model cannot drain your credits or your
context window. See docs/mcp.md.
Documentation
License
MIT — see LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 pyonyphe-3.0.2.tar.gz.
File metadata
- Download URL: pyonyphe-3.0.2.tar.gz
- Upload date:
- Size: 43.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ca5153d9db70f0497d794d814e178e1bd247b5f7efa75f6a125c01bb9ff274e
|
|
| MD5 |
312c906d3a863878e4fbb1d7070916c2
|
|
| BLAKE2b-256 |
b1af027edccc8b77f4b33fe3ddb1a34e9dbf0da30a984a4fef10ed1c9f20d340
|
Provenance
The following attestation bundles were made for pyonyphe-3.0.2.tar.gz:
Publisher:
release.yml on onyphe/pyonyphe
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyonyphe-3.0.2.tar.gz -
Subject digest:
0ca5153d9db70f0497d794d814e178e1bd247b5f7efa75f6a125c01bb9ff274e - Sigstore transparency entry: 2339663993
- Sigstore integration time:
-
Permalink:
onyphe/pyonyphe@a2965bbc0ff6f1a840eec3bf32c45ed9e16ce4a0 -
Branch / Tag:
refs/tags/v3.0.2 - Owner: https://github.com/onyphe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a2965bbc0ff6f1a840eec3bf32c45ed9e16ce4a0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyonyphe-3.0.2-py3-none-any.whl.
File metadata
- Download URL: pyonyphe-3.0.2-py3-none-any.whl
- Upload date:
- Size: 28.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b25172f31d80734b9e7acb43c994b53cd554e897826fa51cfd590c6a262f88e
|
|
| MD5 |
ca9713c44e1b6c8fed6920464a748d5f
|
|
| BLAKE2b-256 |
6c29ef275e07a22da7f3acd6a3f83c7d19af999a33eb0f450649f90d43cfc000
|
Provenance
The following attestation bundles were made for pyonyphe-3.0.2-py3-none-any.whl:
Publisher:
release.yml on onyphe/pyonyphe
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyonyphe-3.0.2-py3-none-any.whl -
Subject digest:
6b25172f31d80734b9e7acb43c994b53cd554e897826fa51cfd590c6a262f88e - Sigstore transparency entry: 2339664027
- Sigstore integration time:
-
Permalink:
onyphe/pyonyphe@a2965bbc0ff6f1a840eec3bf32c45ed9e16ce4a0 -
Branch / Tag:
refs/tags/v3.0.2 - Owner: https://github.com/onyphe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a2965bbc0ff6f1a840eec3bf32c45ed9e16ce4a0 -
Trigger Event:
push
-
Statement type: