--- id: djangorestframework-camel-case version: "1.4.2" license: BSD license_treatment: permissive maintenance: active --- # djangorestframework-camel-case — Camel case JSON support for Django REST framework. License: permissive · Maintenance: active · Downloads: 576.2K/mo ## What it is and what it does This package bridges the naming-convention gap between JavaScript frontend conventions (camelCase) and Python backend conventions (snake_case) in Django REST Framework APIs. It provides custom renderers and parsers that automatically transform field names in both directions—converting Python snake_case model fields to camelCase in JSON responses and converting camelCase request bodies back to snake_case for Python processing. The package handles this transformation at multiple layers: JSON rendering/parsing, form data parsing, and query parameter middleware. It supports configuration options like ignoring specific fields or keys, handling numbers in field names with different conventions, and swapping the underlying JSON renderer (e.g., to use ORJSONRenderer for performance). No runtime dependencies means lightweight installation, but setup requires explicit Django settings configuration. Use it for: - Frontend-backend API contracts where JavaScript clients expect camelCase but Django models use snake_case - Migrating JavaScript-first codebases to Django without renaming all model fields - Standardizing API responses to match JavaScript naming conventions while keeping Python code idiomatic - Handling query parameters in camelCase from frontend requests and converting them to snake_case - Building REST APIs that serve both web and mobile clients expecting camelCase JSON ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Converts JSON field names between camelCase and snake_case in Django REST Framework, providing renderers, parsers, and middleware to handle case transformation automatically. Yes, if you need automatic case conversion between camelCase and snake_case in Django REST Framework. The package is actively maintained, has no runtime dependencies, carries a permissive license, and solves a real naming-convention mismatch problem. Setup requires explicit Django configuration but is straightforward. No known vulnerabilities. Install friction is high only due to configuration overhead, not dependency complexity. ## Install pip install djangorestframework-camel-case uv add djangorestframework-camel-case poetry add djangorestframework-camel-case ## Installing djangorestframework-camel-case Before you install: High install friction due to no runtime dependencies but requires explicit Django settings configuration. Package is actively maintained with recent commits and a stable release history since 2013, though marked Pre-Alpha in classifiers. License in practice: BSD license is permissive; you can use, modify, and distribute this package freely in commercial and open-source projects with minimal restrictions. Quickstart: pip install djangorestframework-camel-case # In Django settings.py: REST_FRAMEWORK = { 'DEFAULT_RENDERER_CLASSES': ( 'djangorestframework_camel_case.render.CamelCaseJSONRenderer', ), 'DEFAULT_PARSER_CLASSES': ( 'djangorestframework_camel_case.parser.CamelCaseJSONParser', ), } MIDDLEWARE = [ 'djangorestframework_camel_case.middleware.CamelCaseMiddleWare', ] Requires Django and Django REST Framework to be installed and configured; no automatic case conversion occurs without explicit settings registration. Verify before relying: - Whether the Pre-Alpha classifier reflects current stability or is outdated given active maintenance since 2013 - Performance impact of recursive case transformation on large JSON payloads - Compatibility with Django REST Framework versions beyond those in classifiers ## Package facts - License: BSD (permissive) - Python support: supports_current - Install friction: high - Maintenance: active - Downloads: 576.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django rest framework camel case json, snake case to camel case conversion, drf json field name transformation, camel case api responses, django rest framework naming convention, json serialization case conversion, api field name mapping, django-rest-framework, json-serialization, naming-conventions [View on SkillFed](https://skillfed.io/packages/djangorestframework-camel-case) · [View on PyPI](https://pypi.org/project/djangorestframework-camel-case/)