All notable changes to this project are documented here. The format follows Keep a Changelog, and the project adheres to Semantic Versioning.
-
Breaking for CLI users.
typerandrichmoved out of the runtime dependencies into a newcliextra. Only the CLI module imports them, but declaring them at runtime forcedrich>=14onto every project that merely imported the client, which made pyonyphe unresolvable alongside pins such ascensys==2.0.9(rich<11).Installing the library is unchanged. To get the
pyonyphecommand, install the extra:uv add 'pyonyphe[cli]'Without it, importing
pyonyphestill works; runningpyonyphefails withModuleNotFoundError: typer. The published container image is unaffected — it installs the extra.
- The Docker build failed since 3.0.1: hatch-vcs delegates to setuptools-scm,
which reads its own
SETUPTOOLS_SCM_PRETEND_VERSION*variables, so the injected version was ignored inside the build context where.gitis absent. No 3.0.1 image was published as a result.
- Project URLs pointed at the fork instead of
onyphe/pyonyphe, so the PyPI page linked to the wrong repository. Same for the GHCR image label and the README badges and examples.
- The version is now derived from the Git tag (
hatch-vcs) instead of being hardcoded inpyproject.toml. Taggingv3.1.0rc1now really produces a3.1.0rc1pre-release; previously the tag name had no effect on the published version.
Full rewrite against the current ONYPHE APIv2.
AsyncOnyphe, an async client mirroring the sync one.pyonypheCLI (Typer + Rich):user,search,export,summary,simple,resolve,bulk summary|simple|discovery,alert list|add|del,config.search_iter()— automatic pagination up to the API's 10000-result ceiling, bounded bymax_results(documents) ormax_pages(API calls)./userand Discovery endpoints, Simple Best and Bulk Simple Best.- Typed exception hierarchy under
OnypheError, withRateLimitErrorexposingretry_after. - Automatic retries with exponential backoff on 429 and 5xx, honouring
Retry-After. - Configuration resolution: argument,
ONYPHE_API_KEY,~/.config/pyonyphe/config.toml,~/.onyphe.ini. - Support for the Unrated endpoint (basic auth +
kparameter). request()escape hatch for endpoints not wrapped yet.py.typed, full type annotations, checked withty.- Ruff as the single linter and formatter, wired into pre-commit and CI.
- Support for a
.envfile (python-dotenv), see.env.example. - CI on Linux/macOS/Windows for Python 3.10-3.13, PyPI release through trusted publishing.
- Container image on GHCR (
linux/amd64andlinux/arm64), built on every push tomainand on each release. - Optional MCP server (
pyonyphe[mcp], commandpyonyphe-mcp) exposingsearch,summary,resolveanduserover stdio. - Documentation as markdown in
docs/.
- Importable package renamed
onyphetopyonyphe.import onyphestill works through a deprecation shim, removed in 4.0.0. - Authentication moved from the
apikeyquery parameter to theAuthorization: bearerheader. requestsreplaced byhttpx.- Non-streaming calls return a pydantic
Responseinstead of a raw dict. - The ~40
simple_*/bulk_*methods collapse intosimple(category, ...),simple_best(...),bulk_simple(...),bulk_summary(...). Seedocs/migration.md. alert_list()is nowalerts()and returnslist[Alert].add_alert()takes athresholdargument.- Packaging moved from
setup.py+requirements.txttopyproject.tomlwith hatchling, asrc/layout, and uv for dependency management. - Minimum Python is now 3.10.
search()andexport()sent the OQL query in the URL path; the API expects it in theqquery parameter.- Bulk endpoint typos:
bulk/simple/clt/ipandbulk/simple/inetenum/ipnever resolved. - Bare
except:clauses swallowed everything, includingKeyboardInterrupt. - Bulk methods leaked an open file handle per call.
- Bulk payloads are normalised to LF endings: an asset list written on Windows used to send carriage returns as part of each value.
synscan()andsimple_synscan(): ONYPHE dropped synscan from the Simple API. Usesearch("category:synscan ...").- The Sphinx documentation build.
- APIv2 support.