Skip to main content

InfoPeak Captcha for Python

Server-side verification for InfoPeak Captcha - the privacy-first, EU-hosted captcha. No tracking, no cookies, no image puzzles.

Install

pip install infopeak-captcha

Requires Python 3.8+. Zero dependencies (standard library only).

Usage

Add the widget to your form (full guide):

<form action="/signup" method="POST">
  <input type="email" name="email" required>
  <div class="infopeak-captcha" data-sitekey="YOUR_SITEKEY"></div>
  <button type="submit">Sign up</button>
</form>
<script src="https://captcha.infopeak.io/infopeak-captcha.js" defer></script>

Verify the token when the form is submitted (Flask example):

import os
from infopeak_captcha import verify, FIELD

@app.post("/signup")
def signup():
    if not verify(
        request.form.get(FIELD),
        sitekey="YOUR_SITEKEY",
        secret=os.environ["INFOPEAK_CAPTCHA_SECRET"],
    ):
        return "Captcha verification failed", 400
    # ... proceed

Django works the same way with request.POST.get(FIELD).

Need quota information too?

from infopeak_captcha import verify_detailed

result = verify_detailed(token, sitekey="YOUR_SITEKEY", secret="YOUR_SECRET")
result.valid       # True when the token was genuine and unused
result.over_limit  # True when the sitekey is over its monthly quota

Verification fails closed: network errors and non-200 responses return valid=False.

Testing

Public test credentials that work on any domain and never count against a quota (never use in production):

sitekey: ipk_test_sitekey
secret:  ipk_test_secret

Links

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

infopeak_captcha-1.0.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

infopeak_captcha-1.0.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file infopeak_captcha-1.0.1.tar.gz.

File metadata

  • Download URL: infopeak_captcha-1.0.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for infopeak_captcha-1.0.1.tar.gz
Algorithm Hash digest
SHA256 bb1d3586ea6dd7856c5561d73634efad6b918bda0a0b3c40c39069a8d80de5a2
MD5 363919a0a4e8c24ad67cfb4a7b13377e
BLAKE2b-256 7b0189050a6c3bdbaf439ac6cfae437f19ae81291c1cbcc495eadfe663f77157

See more details on using hashes here.

Provenance

The following attestation bundles were made for infopeak_captcha-1.0.1.tar.gz:

Publisher: publish.yml on infopeak/captcha-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file infopeak_captcha-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for infopeak_captcha-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 49506409320ad3e3ead817f20e3ed994592005294e60e2fa5295047d1af8101b
MD5 93d78bc0baab5237cc98e5aa04220cf2
BLAKE2b-256 fa0aa273709033748bfa1f7d84196bb47eb6f56f070929d237f100b5f8dc5c4e

See more details on using hashes here.

Provenance

The following attestation bundles were made for infopeak_captcha-1.0.1-py3-none-any.whl:

Publisher: publish.yml on infopeak/captcha-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 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