Skip to main content

altcha-django

Django integration for ALTCHA — built around Widget v3, Proof-of-Work v2, and ALTCHA Sentinel.

  • A real Django form field (Form, ModelForm, formsets, Widget.Media, translated errors).
  • Pluggable verification backend: local proof-of-work or Sentinel (local server-signature verification or the remote API).
  • Atomic replay protection via Django's cache framework.
  • Signals for every verification outcome; optional built-in stats.
  • Test mode and django check system checks.
  • Optional Django REST Framework field.

Requires Python 3.10+ and Django 4.2+.

Install

pip install altcha-django
# extras: [sentinel] (httpx), [argon2] (argon2-cffi), [drf] (djangorestframework)

Quick start — local verification

# settings.py
INSTALLED_APPS = [..., "altcha_django"]
ALTCHA_HMAC_SECRET = "a-long-random-string"   # keep secret

# urls.py
urlpatterns = [..., path("altcha/", include("altcha_django.urls"))]

# forms.py
from django import forms
from altcha_django import AltchaField, AltchaMixin

class ContactForm(AltchaMixin, forms.Form):
    email = forms.EmailField()
    captcha = AltchaField()
# views.py
form = ContactForm(request.POST or None, request=request)
{{ form.media }}
<form method="post">{% csrf_token %}{{ form.as_p }}<button>Send</button></form>

Quick start — Sentinel

ALTCHA_VERIFIER = "sentinel"
# Full challenge URL of your self-hosted Sentinel, API key in the query string:
ALTCHA_SENTINEL_CHALLENGE_URL = "https://sentinel.example.com/v1/challenge?apiKey=key_..."
ALTCHA_SENTINEL_API_SECRET = "sec_..."   # private — never leaves the server

Nothing else changes: the widget fetches its challenge from your Sentinel and the field verifies the signed result locally. Read score / classification with AltchaField(return_result=True).

See docs/ for the full settings reference, signals, system checks, Sentinel guide, testing notes, and migration from django-altcha.

License

MIT

Metadata

Release files for altcha-django 1.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 altcha-django 1.1.0
File Size Uploaded
altcha_django-1.1.0.tar.gz 140.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for altcha-django 1.1.0
File Interpreter ABI Platform
altcha_django-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 248.4 kB

Release files / altcha_django-1.1.0.tar.gz

Download URL altcha_django-1.1.0.tar.gz
Size 140.9 kB
Tags Source
SHA-256 checksum
How to use checksums
60d775e16b43d5ed5caa6d3ad447adcb3d159b3a7af54489461cd6e2aec089e4
BLAKE2b-256 checksum
How to use checksums
7be40a496ceab68634a4664d83eff2e99316c9093fa8da226271b85f04a918f4
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 5, 2026.

Transparency log

Release files / altcha_django-1.1.0-py3-none-any.whl

Download URL altcha_django-1.1.0-py3-none-any.whl
Size 107.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
22bfe5d5ac77dc67e05e30f59039031e0c900dd3b60b3af5f19bc7b8ff970e11
BLAKE2b-256 checksum
How to use checksums
967dab24c69defb0609d616df69262f8bd2b69943acb7056e0587b3794be2b0a
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 5, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

2 release files

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