Skip to main content

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.

Tests PyPI version License

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

  1. Scan MVP — single page, manual corner adjustment, perspective warp
  2. Auto contour detection refinements
  3. Multi-page flow polish
  4. KYC MVP — selfie + ID capture, embedding comparison, head-movement liveness challenge
  5. Anti-deepfake hardening — server-verified liveness, passive scoring, multiple challenge types
  6. Docs site + PyPI release

License

MIT

Metadata

Release files for django-camera-kit 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-camera-kit 0.1.0
File Size Uploaded Provenance
django_camera_kit-0.1.0.tar.gz 4.1 MB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django-camera-kit 0.1.0
File Interpreter ABI Platform
django_camera_kit-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.2 MB

Release files / django_camera_kit-0.1.0.tar.gz

Download URL django_camera_kit-0.1.0.tar.gz
Size 4.1 MB
Tags Source
SHA-256 checksum
How to use checksums
846bc9eb92e9f046f7f7e9bccc01c1d05fb1a9fe569e29cbe4fd0c6362d73faf
BLAKE2b-256 checksum
How to use checksums
991238fa8cd365be64e8a5ddf60ca561a6e6ffc271a78c4bc5dd17bd47e8345a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 10, 2026.

Transparency log

Release files / django_camera_kit-0.1.0-py3-none-any.whl

Download URL django_camera_kit-0.1.0-py3-none-any.whl
Size 4.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
e6adf24c06d41d44ac7fd9a0cd9848b8cc666cf6453df951a70729b14632f84a
BLAKE2b-256 checksum
How to use checksums
046ae55834f4792e6b70cd6053345003e13fb079d464093dd6219f9a7cc90451
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 10, 2026.

Transparency log

Security for django-camera-kit 0.1.0

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for django_camera_kit-0.1.0.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 Jul 10, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page