skillfed

onfido-python

Python library for the Onfido API

onfido-python v6.2.0 1.1M downloads/30d#4,414 on PyPI43
Permissive license MIT Active released

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-python

uv

uv add onfido-python

poetry

poetry add onfido-python

Installing 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

onfido api client pythonidentity verification sdkapplicant management apionfido integration librarykyc verification pythonwebhook event verificationoauth2 api authentication
identity-verificationkycapi-client

More WWW/HTTP packages