Metadata-Version: 2.4
Name: entirius-django-captcha
Version: 2.0.0
Summary: reCAPTCHA verification Django module
Project-URL: Repository, https://github.com/entirius/entirius-django-captcha
Author: Entirius
License-Expression: MPL-2.0
License-File: LICENSE
Requires-Python: >=3.11
Requires-Dist: django>=4.0.0
Requires-Dist: entirius-django-utils>=2.0.0
Requires-Dist: requests>=2.28.0
Provides-Extra: dev
Requires-Dist: pre-commit; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Provides-Extra: test
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-django; extra == 'test'
Description-Content-Type: text/markdown

# django-captcha

reCAPTCHA verification for Django — a `verify_recaptcha` view decorator backed by per-channel
`Service` configuration (site scope, secret key, active flag).

## Installation

```shell
pip install entirius-django-captcha
```

Add the app to your project:

```python
INSTALLED_APPS = [
    ...
    "django_captcha",
]
```

## Usage

```python
from django_captcha.output.decorators import verify_recaptcha

@verify_recaptcha
def my_view(request):
    ...
```

The decorator reads the token from the `X-Recaptcha-Token` request header (configurable via
`CAPTCHA_TOKEN_HEADER_NAME`) and validates it against the Google reCAPTCHA API.

## Development

```shell
make install     # sync dependencies (uv)
make check       # lint + format check (ruff)
make test        # test suite (pytest + pytest-django)
```

Development and agent instructions: [AGENTS.md](AGENTS.md).

## License

Mozilla Public License 2.0 — see [LICENSE](LICENSE).
