Bytid for Python
Bytid was called UVerify (and, briefly, ByteID). Package names are unchanged, and
UVerifyandByteIDstill work as aliases ofBytid.
The official Python library for Bytid: BVN, NIN, driver’s licence and voter’s card checks, liveness and face match, ID documents, AML screening and CAC, for Nigerian businesses.
pip install uverify
Python 3.8 or later. No dependencies.
Quick start
from uverify import Bytid
bytid = Bytid("uvk_test_...") # or set BYTID_API_KEY; uvk_test_ is the free sandbox
v = bytid.identity.nin(id_number="12345678901", first_name="Adaeze", last_name="Okafor")
if v["status"] == "verified":
print(v["data"], v["field_matches"])
In the sandbox the last two digits of the ID number choose the result: 00 not found, 99 registry error, 98 face mismatch, anything else verified.
A live customer, end to end
session = bytid.liveness.create_session(redirect_url="https://yourapp.com/kyc/done")
# send the person to session["url"]; when they come back:
v = bytid.identity.bvn_face_match(
id_number="22212345678", first_name="Adaeze", last_name="Okafor",
liveness_session_id=session["id"],
aml_screening=True,
)
if v["status"] == "verified" and v["face_match"]["status"] == "matched" and v["aml_screening"]["status"] == "clear":
... # approve
Everything else
bytid.identity.bvn(id_number=..., first_name=..., last_name=...) # also drivers_license, voters_card, tin
bytid.identity.nin_face_match(id_number=..., selfie_image=open("me.jpg", "rb").read())
bytid.business.cac(id_number="RC123456", aml_screening=True)
bytid.documents.verify(front_image=open("nin.jpg", "rb").read(), document_type="nin_card")
bytid.aml.screen(name="Adaeze Okafor", date_of_birth="1990-01-15")
bytid.aml.monitors.create(name="Adaeze Okafor")
link = bytid.kyc.create_link(customer_name="Ada", require_document=True) # send link["url"]
bytid.address.verify(address="12 Admiralty Way, Lekki Phase 1", lga="Eti-Osa", state="Lagos") # on the map, in that LGA and state?
home = bytid.address.create_link(address="12 Admiralty Way", state="Lagos", customer_name="Ada")
# send home["url"]: they open it at home and share their phone's location; read result / location["distance_m"] later
bytid.address.verify_document(front_image=open("bill.jpg", "rb").read(), address="12 Admiralty Way", state="Lagos", name="Adaeze Okafor")
bytid.verifications.list(status="verified")
bytid.account.balance()
Responses are plain dicts, exactly as in the API reference.
Errors
from uverify import UVerifyError
try:
bytid.identity.nin(id_number=id_number)
except UVerifyError as e:
if e.code == "insufficient_balance":
...
print(e.code, e.message, e.request_id, e.details)
A check that finds nothing isn’t an error: it returns status: "not_found" (and you aren’t charged).
Retries
Timeouts, connection errors, 5xx and rate limits are retried twice with backoff (max_retries, timeout). Every check carries a reference (generated if you don’t pass one), so a retry never charges twice, and if the first attempt went through you get that result.
Webhooks
from uverify import construct_event, UVerifySignatureError
@app.post("/webhooks/uverify") # Flask/FastAPI/Django: use the raw body
def hook():
try:
event = construct_event(request.get_data(), request.headers.get("Bytid-Signature"), WEBHOOK_SECRET)
except UVerifySignatureError:
return "", 400
if event["type"] == "verification.completed":
...
return "", 200
Deliveries can repeat: dedupe on event["id"].
Tests
python -m unittest discover -s tests # offline
UVERIFY_TEST_KEY=uvk_test_... python -m unittest tests.test_sandbox
MIT licence.
Metadata
Release files for uverify 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| uverify-0.2.2.tar.gz | 12.1 kB | With provenance | Details for uverify-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| uverify-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for uverify-0.2.2-py3-none-any.whl |
Total release size: 21.8 kB
Release files / uverify-0.2.2.tar.gz
| Download URL | uverify-0.2.2.tar.gz |
|---|---|
| Size | 12.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
808d3d217cb0d63804e08b76b3488486aed0cf95e69852df63768c9ed2e2e601
|
|
BLAKE2b-256 checksum How to use checksums |
cb3e3f187ac5b53d531dafd6a759994045abec53cca480ded835dd8c4f63c010
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency logRelease files / uverify-0.2.2-py3-none-any.whl
| Download URL | uverify-0.2.2-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a6ebe2a05851e8e57ec032da051f2470fe947e090b1b33e7407ffa03fa7a82b4
|
|
BLAKE2b-256 checksum How to use checksums |
a420b8d0dfe01b4d14ee0d9e62ea812adea574790b0d50d097fb10e97288b593
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency logSecurity for uverify 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for uverify-0.2.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.