--- id: django-classy-tags version: "4.1.0" license: BSD license_treatment: permissive maintenance: active --- # django-classy-tags — Class based template tags for Django License: permissive · Maintenance: active · Downloads: 412.3K/mo ## What it is and what it does Django Classy Tags is a library that provides a class-based alternative to Django's function-based template tag pattern. Instead of writing procedural parsing logic, you declare your tag's arguments and behavior as class attributes, then implement methods to compute the output. The library handles argument parsing, validation, and integration with Django's template system automatically. It is typically used when building reusable template tags for Django projects—particularly when tags have complex or optional arguments. The package supports parse-until blocks (for tags that wrap template content) and is designed to be extensible for custom argument types and tag behaviors. Use it for: - Build custom template tags with optional arguments and defaults without writing custom parsing logic. - Create tags that store computed values in template variables using the 'as' pattern. - Implement block-level template tags that wrap and process template content between opening and closing tags. - Reduce boilerplate when maintaining a library of reusable Django template tags across projects. - Extend tag behavior through inheritance when multiple tags share similar argument structures. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a class-based system for writing Django template tags with declarative argument parsing, reducing boilerplate while maintaining full compatibility with Django's templating infrastructure. Yes. This is a stable, actively maintained library (last commit 2026-08-10) with no known vulnerabilities, low install friction, and a permissive BSD license. It directly addresses template tag verbosity in Django development and is well-suited for any Django project that uses custom template tags. ## Install pip install django-classy-tags uv add django-classy-tags poetry add django-classy-tags ## Installing django-classy-tags Before you install: Low friction installation with a single wheel distribution. Actively maintained as of August 2026 with recent commits; supports current Python versions (3.8–3.11) and modern Django releases (3.2–4.2). License in practice: BSD permissive license allows use in commercial and private projects with minimal restrictions; no copyleft obligations. Quickstart: pip install django-classy-tags from django import template register = template.Library() # Define a class-based tag with declarative options and arguments # Implement get_value() to compute the tag's output Requires django to be installed; intended for use within Django projects only. Verify before relying: - Whether the class-based approach is actually cleaner or more maintainable than Django's default function-based pattern in practice. - Real-world performance characteristics compared to standard Django template tags. - Adoption rate and community feedback on the class-based pattern versus alternatives. ## Package facts - License: BSD (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 412.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django template tags class based, django template tag argument parser, django custom template tags, django template tag boilerplate, django classy tags, django-template-tags [View on SkillFed](https://skillfed.io/packages/django-classy-tags) · [View on PyPI](https://pypi.org/project/django-classy-tags/)