onfido-python
Python library for the Onfido API
What it is and what it does
onfido-python is the official client library for integrating with Onfido's identity verification API. It wraps the Onfido API v3.6 and is auto-generated from the OpenAPI specification, providing a type-safe interface for creating applicants, managing checks, and verifying webhook events. The library supports both API token and OAuth2 client credentials authentication, with automatic token refresh for OAuth flows.
The package handles the low-level HTTP communication via urllib3 and uses pydantic for request/response validation. It includes built-in webhook signature verification to ensure payloads are authentic and unmodified. The library is actively maintained, supports Python 3.9+, and has no known security vulnerabilities. It is intended for developers building KYC/identity verification workflows into Python applications.
Use it for:
- Build a user onboarding flow that creates applicants and initiates identity checks via the Onfido API.
- Verify webhook signatures from Onfido to securely process check completion events in your backend.
- Integrate identity verification into a Python web application using OAuth2 credentials for multi-tenant deployments.
- Automate applicant data retrieval and check status monitoring for compliance reporting.
- Handle regional API endpoints (EU, US, CA) with configurable timeouts for different network conditions.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Official Python client library for the Onfido API, enabling identity verification and applicant management workflows through a generated OpenAPI interface.
Yes. This is the official, actively maintained client library for Onfido's API, with low install friction, no known vulnerabilities, permissive licensing, and a large user base (top 5000 on PyPI). Install it if you are integrating Onfido identity verification into a Python application. The only gotcha is the Python 3.9+ requirement and the need for valid Onfido credentials.
Install
onfido-python on PyPI
pip
pip install onfido-pythonuv
uv add onfido-pythonpoetry
poetry add onfido-pythonInstalling onfido-python
Before you install
Low friction install with a pure-Python wheel. Actively maintained with a recent release (85 days ago) and no known vulnerabilities. Runtime dependencies are standard and widely used (urllib3, pydantic, python-dateutil).
License in practice
MIT license is permissive; you can use, modify, and distribute this library with minimal restrictions, provided you include the license notice.
Quickstart
pip install onfido-python
import onfido
import os
config = onfido.Configuration(
api_token=os.environ['ONFIDO_API_TOKEN'],
region=onfido.configuration.Region.EU
)
with onfido.ApiClient(config) as api_client:
api = onfido.DefaultApi(api_client)
applicant = api.create_applicant(
onfido.ApplicantBuilder(first_name='John', last_name='Doe')
)
Requires Python 3.9 or later and a valid Onfido API token or OAuth2 credentials.
Verify before relying
- Whether the library's webhook signature verification is cryptographically sound and follows current best practices.
- Performance characteristics and rate-limit handling for high-volume applicant creation or check workflows.
- Completeness of coverage for all Onfido API v3.6 endpoints and whether any are still in alpha/beta.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — urllib3, python-dateutil, pydantic, typing-extensions, virtualenv |
| Maintenance | actively maintained — 85 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,066,500/month — #4,414 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: onfido_python-6.2.0-py3-none-any.whl
Keywords: OpenAPI, OpenAPI-Generator, onfido, identity
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
oneloginOfficial Python SDK for OneLogin's API,…
unclear · top 15,000 on PyPI
workosA Python client library for the WorkOS API that…
permissive · top 5,000 on PyPI
polar-sdkPython SDK for interacting with the Polar API,…
permissive · top 15,000 on PyPI
legit-api-clientA Python client library for interacting with an…
permissive · top 15,000 on PyPI
onesignal-python-apiA Python client library for the OneSignal API…
unclear · top 15,000 on PyPI
apimatic-core-interfacesProvides abstract interfaces and type…
permissive · top 15,000 on PyPI
plaid-pythonOfficial Python client library for the Plaid…
permissive · top 5,000 on PyPI
dropbox-signPython client library for the Dropbox Sign v3…
permissive · top 5,000 on PyPI
stackit-coreProvides core authentication, configuration,…
permissive · top 15,000 on PyPI
seeqPython SDK for interfacing with Seeq Server…
unclear · top 15,000 on PyPI