Document scanning and KYC face verification widgets for Django
Project description
Django Camera Kit
Document scanning and KYC face verification widgets for Django. Drop a real document scanner (live edge detection, manual corner adjustment, multi-page → PDF) into any existing FileField, no new models or endpoints required. Add live selfie/ID face verification with a server-side matching endpoint.
Documentation | PyPI | Source
Status
Document scanning (this package's base install) and KYC identity verification (the kyc extra) are both implemented and tested. See the documentation for the full guide, including the KYC module's security model and known MVP limitations.
Quick example
# forms.py — any existing ModelForm, any existing FileField/ImageField
from django import forms
from django_camera_kit.widgets import DocumentScannerWidget
from .models import Contract
class ContractForm(forms.ModelForm):
class Meta:
model = Contract
fields = ["signed_document"]
widgets = {"signed_document": DocumentScannerWidget()}
<!-- template -->
{{ form.media }}
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form }}
<button type="submit">Enregistrer</button>
</form>
The widget replaces the plain file input with a "Scanner un document" button. Clicking it opens the camera, detects the document's edges live (OpenCV.js), lets the user drag the corners if detection misses, and supports adding several pages before assembling everything into a single PDF — written back into the same file input via the DataTransfer API. From the form's point of view, it's a normal file upload.
KYC quick example
pip install django-camera-kit[kyc]
# forms.py
from django import forms
from django_camera_kit.kyc.widgets import KYCVerificationWidget
class SignupForm(forms.Form):
kyc_verification_id = forms.IntegerField(
widget=KYCVerificationWidget(verify_url="/kyc/verify/")
)
Requires PostgreSQL with the pgvector extension. Matching (face embeddings via YuNet + insightface) only ever happens server-side. See KYC & Identity Verification for the full setup and security model.
Setup
Two vendor JS files are required for the scan widget and not committed to this repo (binary build artifacts, pinned separately) — see django_camera_kit/static/django_camera_kit/vendor/README.md for exact files and versions to download.
Requires Bootstrap (or Bootstrap Native) CSS/JS to already be loaded on the host page for button styling — django-camera-kit only ships the structural/positioning CSS for the scanner overlays themselves.
Roadmap
Scan MVP— single page, manual corner adjustment, perspective warp- Auto contour detection refinements
- Multi-page flow polish
KYC MVP— selfie + ID capture, embedding comparison, head-movement liveness challenge- Anti-deepfake hardening — server-verified liveness, passive scoring, multiple challenge types
Docs site+ PyPI release
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_camera_kit-0.1.0.tar.gz.
File metadata
- Download URL: django_camera_kit-0.1.0.tar.gz
- Upload date:
- Size: 4.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
846bc9eb92e9f046f7f7e9bccc01c1d05fb1a9fe569e29cbe4fd0c6362d73faf
|
|
| MD5 |
f1ae4f97662fcebbf85b1654e7dd0d92
|
|
| BLAKE2b-256 |
991238fa8cd365be64e8a5ddf60ca561a6e6ffc271a78c4bc5dd17bd47e8345a
|
Provenance
The following attestation bundles were made for django_camera_kit-0.1.0.tar.gz:
Publisher:
publish.yml on Altius-Academy-SNC/django-camera-kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_camera_kit-0.1.0.tar.gz -
Subject digest:
846bc9eb92e9f046f7f7e9bccc01c1d05fb1a9fe569e29cbe4fd0c6362d73faf - Sigstore transparency entry: 2138432344
- Sigstore integration time:
-
Permalink:
Altius-Academy-SNC/django-camera-kit@af999912e0a0b5a042e766ebd61bc820a8f613b1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Altius-Academy-SNC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@af999912e0a0b5a042e766ebd61bc820a8f613b1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file django_camera_kit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: django_camera_kit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6adf24c06d41d44ac7fd9a0cd9848b8cc666cf6453df951a70729b14632f84a
|
|
| MD5 |
5d445fba8e60b85bd0003f88050ffc69
|
|
| BLAKE2b-256 |
046ae55834f4792e6b70cd6053345003e13fb079d464093dd6219f9a7cc90451
|
Provenance
The following attestation bundles were made for django_camera_kit-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Altius-Academy-SNC/django-camera-kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_camera_kit-0.1.0-py3-none-any.whl -
Subject digest:
e6adf24c06d41d44ac7fd9a0cd9848b8cc666cf6453df951a70729b14632f84a - Sigstore transparency entry: 2138432390
- Sigstore integration time:
-
Permalink:
Altius-Academy-SNC/django-camera-kit@af999912e0a0b5a042e766ebd61bc820a8f613b1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Altius-Academy-SNC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@af999912e0a0b5a042e766ebd61bc820a8f613b1 -
Trigger Event:
release
-
Statement type: