$npx skillfedfor your agent

drf-recaptcha

Django rest framework recaptcha field serializer

With conditionsPyPI LibrariesReleased Aug 2025242.6K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — drf_recaptcha-4.0.3-py3-none-any.whl
v4.0.3 · released 2025-08-22 · Python >=3.10 · 3 runtime deps: django, django-ipware, djangorestframework

Yes, if you are running Django and djangorestframework and need reCAPTCHA integration. The package is stable, supports current Python versions (3.10, 3.11, 3.12, 3.13) and recent Django releases (4.2, 5.0, 5.1, 5.2), has low install friction, and carries no known vulnerabilities. The aging maintenance status is a minor concern for a mature, narrow-scope library; monitor the repository for security updates. Not necessary if you handle reCAPTCHA verification outside the serializer layer.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires a Google reCAPTCHA account and secret key.
  • The request context must be passed to the serializer for verification to work.
  • Low install friction with a pure-Python wheel.

License · maintenance · safety

MIT (permissive) — MIT license is permissive, allowing commercial and private use with minimal restrictions. No notable licensing constraints for typical adoption.

last release 2025-08-22 (357 days) · last repo commit 2025-09-15 · 93 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 242,628 downloads/mo, #8,849 on PyPI

Verify before relying

pip install drf-recaptcha

# In Django settings:
INSTALLED_APPS = [..., "drf_recaptcha"]
DRF_RECAPTCHA_SECRET_KEY = "YOUR_GOOGLE_SECRET"

# In a serializer:
from drf_recaptcha.fields import ReCaptchaV2Field

class MySerializer:
    recaptcha = ReCaptchaV2Field()
  • Whether the package handles rate-limiting or request throttling when verifying with Google's API.
  • Performance impact of network calls to Google's verification endpoint during serializer validation.
  • Behavior and error handling when Google's reCAPTCHA service is temporarily unavailable.
  • How django-ipware is used internally for client IP detection.
Same gist for agents: .md · .json

What it is and what it does

drf-recaptcha is a field serializer for Django REST Framework that embeds Google's reCAPTCHA verification into your API request validation pipeline. It supports both reCAPTCHA v2 (checkbox) and v3 (invisible, score-based) flows, allowing you to reject bot traffic at the serializer level before your business logic runs.

The package wraps Google's verification API and exposes ReCaptchaV2Field and ReCaptchaV3Field as field types. You add them to your serializers, configure a secret key in Django settings, and the field automatically validates incoming tokens against Google's servers. For v3, you can set per-action score thresholds to tune sensitivity. It supports dynamic secret key injection via request context, useful for multi-tenant or platform-specific deployments.

Use it for

  • Protect user registration or password-reset endpoints from automated account-creation attacks using reCAPTCHA v2.
  • Add invisible bot detection to feedback or contact forms by validating reCAPTCHA v3 scores without user friction.
  • Enforce action-specific bot thresholds using v3 action scores configured in settings.
  • Test bot-detection logic in CI/CD by toggling DRF_RECAPTCHA_TESTING mode to mock verification without calling Google.
  • Override secret keys per request via serializer context for multi-platform deployments.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you are running Django and djangorestframework and need reCAPTCHA integration.

The package is stable, supports current Python versions (3.10, 3.11, 3.12, 3.13) and recent Django releases (4.2, 5.0, 5.1, 5.2), has low install friction, and carries no known vulnerabilities. The aging maintenance status is a minor concern for a mature, narrow-scope library; monitor the repository for security updates. Not necessary if you handle reCAPTCHA verification outside the serializer layer.

Install

drf-recaptcha on PyPI

Before you install

Low install friction with a pure-Python wheel. Maintenance status is aging—last release was 357 days ago—but the repository remains active with recent commits and the package is marked Production/Stable. Supports current Python versions and recent Django releases.

Requires a Google reCAPTCHA account and secret key. The request context must be passed to the serializer for verification to work.

License in practice

MIT license is permissive, allowing commercial and private use with minimal restrictions. No notable licensing constraints for typical adoption.

Quickstart

pip install drf-recaptcha

# In Django settings:
INSTALLED_APPS = [..., "drf_recaptcha"]
DRF_RECAPTCHA_SECRET_KEY = "YOUR_GOOGLE_SECRET"

# In a serializer:
from drf_recaptcha.fields import ReCaptchaV2Field

class MySerializer:
    recaptcha = ReCaptchaV2Field()

Verify before relying

  • Whether the package handles rate-limiting or request throttling when verifying with Google's API.
  • Performance impact of network calls to Google's verification endpoint during serializer validation.
  • Behavior and error handling when Google's reCAPTCHA service is temporarily unavailable.
  • How django-ipware is used internally for client IP detection.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
3 packages
djangodjango-ipwaredjangorestframework
MaintenanceAging 357 days since the last release
Last repo commit
First released
Downloads242,628 / month, #8,849 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: PluginsEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 4.2Framework :: Django :: 5.0Framework :: Django :: 5.1Framework :: Django :: 5.2Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Internet :: WWW/HTTP :: Dynamic ContentTopic :: SecurityTopic :: Software Development :: Libraries

Evidence: drf_recaptcha-4.0.3-py3-none-any.whl

Tags

Capabilities
django rest framework recaptchadrf recaptcha field serializergoogle recaptcha v2 v3 djangobot detection django rest apirecaptcha validation drfdjango api spam protectionrecaptcha score validation
Topics
bot-detectionapi-securityform-validation
PyPI keywords
djangodrfrestdjango-rest-frameworkreCAPTCHAreCAPTCHA v2reCAPTCHA v3

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “django rest framework recaptcha”

Give your agent the search over MCP, or paste the wish link into any chat.

More Libraries packages

urllib3 Worth it
PyPI · Libraries · released May 2026

urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.

MITpure Python · 3.10+
1.8Bdownloads / mo
requests Worth it
PyPI · Libraries · released May 2026

Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.

Apache-2.0pure Python · 3.10+
1.8Bdownloads / mo
pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
python-dateutil Worth it
PyPI · Libraries · released Mar 2024

Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.

Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.

Apache-2.0pure Python
1.2Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.

MITpure Python
1.2Bdownloads / mo
pytest Worth it
PyPI · Libraries · released Jun 2026

pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.

MITpure Python · 3.10+
1.1Bdownloads / mo

See also django-recaptcha · drf-pydantic · drf-jsonschema-serializer · drf-dynamic-fields · drf-exceptions-hog · djangorestframework-role-filters · django-rest-framework-docs · djangorestframework-simplejwt · drf-orjson-renderer · django-localflavor