$npx skillfedfor your agent

djangorestframework-api-key

API key permissions for the Django REST Framework

With conditionsPyPI Python ModulesReleased Apr 20252.1M downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — djangorestframework_api_key-3.1.0-py3-none-any.whl
v3.1.0 · released 2025-04-04 · Python >=3.8 · 1 runtime deps: packaging

Yes, with conditions. Install this if you need simple, secure API key authentication for server-to-server or service-to-API access in a Django REST Framework project. The library has no known vulnerabilities and supports current Python and Django versions. However, maintenance is aging (last release 497 days ago), so verify the feature set meets your needs before committing. Do not use this for user authentication.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Django and Django REST Framework to be installed and configured; Python 3.8 or later.
  • Low install friction with a single runtime dependency (packaging).
  • Maintenance status is aging—last release was 497 days ago—but the repository is active and not archived with recent commits.

License · maintenance · safety

MIT (permissive) — MIT license is permissive, allowing commercial and private use with minimal restrictions. You may use, modify, and distribute freely as long as you include the license notice.

last release 2025-04-04 (497 days) · last repo commit 2025-04-04 · 742 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,118,359 downloads/mo, #3,282 on PyPI

Verify before relying

pip install "djangorestframework-api-key==3.*"

# In settings.py
INSTALLED_APPS = [
    "rest_framework",
    "rest_framework_api_key",
]

# Run migrations
python manage.py migrate
  • Whether the SHA512-based key hasher is suitable for your security requirements.
  • Performance impact of API key validation in your specific deployment context.
  • Whether API keys alone meet your authorization needs or if OAuth would be more appropriate.
Same gist for agents: .md · .json

What it is and what it does

This library adds API key-based authentication to Django REST Framework APIs, allowing you to issue, manage, and validate API keys for server-side clients—typically third-party services or internal backends—that need to access your API without user accounts. Keys are hashed before storage and can be created, viewed, and revoked through Django's admin interface or programmatically.

The package is designed specifically for machine-to-machine access and blocking anonymous traffic, not for identifying individual users. It includes permission classes that integrate with DRF's permission system, support for optional expiry dates, and customizable models and admin panels. The library emphasizes security by treating API keys with the same care as passwords and recommends serving your API over HTTPS.

Use it for

  • Blocking anonymous traffic to your API while allowing authenticated service-to-service requests.
  • Implementing API key-based throttling to rate-limit requests from specific clients or services.
  • Authorizing internal services, such as communication between your API server and an internal frontend application.
  • Logging and identifying usage patterns by associating requests with specific API keys.
  • Managing access for third-party backend services that need to interact with your API without user credentials.

Worth the install?

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

With conditions

Yes, with conditions.

Install this if you need simple, secure API key authentication for server-to-server or service-to-API access in a Django REST Framework project. The library has no known vulnerabilities and supports current Python and Django versions. However, maintenance is aging (last release 497 days ago), so verify the feature set meets your needs before committing. Do not use this for user authentication.

Install

djangorestframework-api-key on PyPI

Before you install

Low install friction with a single runtime dependency (packaging). Maintenance status is aging—last release was 497 days ago—but the repository is active and not archived with recent commits.

Requires Django and Django REST Framework to be installed and configured; Python 3.8 or later.

License in practice

MIT license is permissive, allowing commercial and private use with minimal restrictions. You may use, modify, and distribute freely as long as you include the license notice.

Quickstart

pip install "djangorestframework-api-key==3.*"

# In settings.py
INSTALLED_APPS = [
    "rest_framework",
    "rest_framework_api_key",
]

# Run migrations
python manage.py migrate

Verify before relying

  • Whether the SHA512-based key hasher is suitable for your security requirements.
  • Performance impact of API key validation in your specific deployment context.
  • Whether API keys alone meet your authorization needs or if OAuth would be more appropriate.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
packaging
MaintenanceAging 497 days since the last release
Last repo commit
First released
Downloads2,118,359 / month, #3,282 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 2.2Framework :: Django :: 3.2Framework :: Django :: 4.2Framework :: Django :: 5.2Intended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python Modules

Evidence: djangorestframework_api_key-3.1.0-py3-none-any.whl

Tags

Capabilities
api key permissions djangoserver-to-server api authenticationdjango api key managementmachine client api access controlapi key throttling djangodjango rest framework authenticationapi key validation
Topics
api-authenticationkey-management

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 › “api key permissions django”

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

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also django-oauth-toolkit · djangorestframework-simplejwt · djangorestframework · authzed · dry-rest-permissions · zope.security · drf-api-logger · djangorestframework-guardian · djangorestframework-types · django-guardian