Skip to content

5.1.0

Latest

Choose a tag to compare

@dbirulia dbirulia released this 14 May 03:59
· 1 commit to master since this release
89797db

Highlights

This release ships a full command-line interface for the Veryfi SDK so AI agents and shell users can drive the API from a terminal without writing Python. The CLI is purely additive — Client's constructor and every public method are byte-identical to 5.0.1, and all existing tests pass untouched.

What's new

  • veryfi console script (and python -m veryfi) — one Typer sub-app per resource: documents, bank-statements, checks, business-cards, w2s, w8s, w9s, any-docs, classify, with nested line-items, tags, and PDF/W-2 split commands.
  • Env-var-first authVERYFI_CLIENT_ID, VERYFI_USERNAME, VERYFI_API_KEY (plus optional VERYFI_CLIENT_SECRET, VERYFI_BASE_URL, VERYFI_API_VERSION, VERYFI_TIMEOUT); equivalent --flags override env. Missing creds exit 2 with a JSON error on stderr.
  • Agent-friendly I/O — JSON to stdout (with --output json|raw|pretty), structured JSON errors to stderr, exit codes mapped from the HTTP status (clipped to 1-255) so agents can branch without parsing tracebacks.
  • veryfi schema — emits a machine-readable manifest of every command and parameter for tool/MCP registration.
  • Repeatable --field KEY=VALUE / --json-body for endpoints that take **kwargs. Values are JSON-coerced (total=11.23 → number, enabled=true → bool, full JSON objects accepted).
  • Pipe-friendly--file - reads bytes from stdin.
  • Dynamic User-Agentclient_base.py now resolves the version via importlib.metadata, so the User-Agent: Python Veryfi-Python/<version> header always tracks the pbr-derived release with no manual bumps.

Quick start

pip install -U veryfi
export VERYFI_CLIENT_ID=... VERYFI_USERNAME=... VERYFI_API_KEY=...

veryfi documents process --file /tmp/receipt.jpg --category Travel
veryfi classify file --file /tmp/unknown.pdf --document-type receipt --document-type invoice
veryfi schema | jq '.commands[] | .name'

See the new Command-line interface section in the README for the full reference.

Compatibility

  • Python 3.9+
  • All existing Python (from veryfi import Client) code works without changes.
  • New runtime dependency: typer>=0.12.0.

Pull requests in this release

  • #53 — Add veryfi CLI for shell and AI agent usage
  • #54 — Add 5.1.0 entry to NEWS.md