Skip to main content

cripcha

Server side check of Cripcha tokens for Python 3.9+: Django, Flask, FastAPI. No dependency.

pip install cripcha            # or: pip install "cripcha[django]", "cripcha[flask]", "cripcha[fastapi]"
from cripcha import verify, TOKEN_FIELD
result = verify(form_data.get(TOKEN_FIELD), secret=os.environ["CRIPCHA_SECRET"])

Django (CRIPCHA_SITE_KEY, CRIPCHA_SECRET in the settings; "cripcha" in INSTALLED_APPS for the translated message):

from cripcha.django import CripchaField
class ContactForm(forms.Form):
    message = forms.CharField(widget=forms.Textarea)
    cripcha = CripchaField()

Flask: cripcha = Cripcha(app), cripcha.verify_request() in the view, {{ cripcha_widget() }} in the template.

FastAPI: guard = CripchaGuard(secret=…) then Depends(guard) on the route (403 when refused).

Fails closed, never raises for an API error. Test secrets: cs_test_always_pass / cs_test_always_fail.

Metadata

Release files for cripcha 1.0.3

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

Source distribution (sdist)

Source distribution for cripcha 1.0.3
File Size Uploaded Provenance Actions
cripcha-1.0.3.tar.gz 10.3 kB Without provenance Details for cripcha-1.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cripcha 1.0.3
File Interpreter ABI Platform Actions
cripcha-1.0.3-py3-none-any.whl Python 3 none any Details for cripcha-1.0.3-py3-none-any.whl

Total release size: 24.1 kB

Release files / cripcha-1.0.3.tar.gz

Download URL cripcha-1.0.3.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ba867a932eb7bd607b7223b00fe0bf5f00dcbc365f82b680488b75f41a041d9b
BLAKE2b-256 checksum
How to use checksums
bb8bfd2a717a5b38a2cb748378a3d3c68bffa198dba5c05cad05405d029478e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / cripcha-1.0.3-py3-none-any.whl

Download URL cripcha-1.0.3-py3-none-any.whl
Size 13.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
35c9ec92ff83b20b87074e78504eea7437065dc1f27f6e965f94b5fa9ae64779
BLAKE2b-256 checksum
How to use checksums
4c344540d191907586a6fb91f3dc1c1aadca164783851ecdedffeb3d39b181e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for cripcha 1.0.3

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files No 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