Skip to main content

A comprehensive toolkit containing various utilities for Django and Python development

Project description

Armanc Toolkit

A comprehensive toolkit containing various utilities for Django and Python development, with enhanced Inertia.js integration.

Features

Django Inertia Integration

Enhanced Inertia.js support for Django applications with:

  • InertiaResponse: Advanced response handling with message support
  • View Mixins: Complete set of class-based views for Inertia.js
    • InertiaResponseMixin: Base mixin for Inertia responses
    • GenericView: Base view with form handling
    • TemplateView: Simple template rendering
    • FormView: Form handling with validation
    • ListView: Model list views with pagination
    • DetailView: Single object detail views
    • CreateView: Object creation with forms
    • UpdateView: Object editing with forms
    • DeleteView: Object deletion with confirmation

Installation

pip install armanc-toolkit

Usage

Django Settings

Add the Inertia app to your Django settings:

INSTALLED_APPS = [
    # ... your other apps
    'armanc.django.inertia',
]

Views

from armanc.django.inertia.views import TemplateView, ListView, CreateView
from django.contrib.auth.models import User

class DashboardView(TemplateView):
    template_name = 'Dashboard'

class UserListView(ListView):
    model = User
    template_name = 'Users/Index'
    paginate_by = 10

class UserCreateView(CreateView):
    model = User
    template_name = 'Users/Create'
    fields = ['username', 'email', 'first_name', 'last_name']

Response Handling

from armanc.django.inertia.response import InertiaResponse

def my_view(request):
    return InertiaResponse(
        request,
        component='MyComponent',
        props={'data': 'example'}
    )

Requirements

  • Python >=3.13
  • Django >=4.2,<6.0
  • djantic2 >=1.0.5
  • inertia-django >=1.2.0
  • telepath >=0.3.1

License

MIT License

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

armanc_toolkit-0.1.1.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

armanc_toolkit-0.1.1-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file armanc_toolkit-0.1.1.tar.gz.

File metadata

  • Download URL: armanc_toolkit-0.1.1.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.5

File hashes

Hashes for armanc_toolkit-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ce3a572e6d22c4189e686fd51c25484faf30a3cfdcee47d5f2d03d3bdc0cf74c
MD5 e16a9299db1129321bf35a80dfc338d9
BLAKE2b-256 8b20c757c7ba4c970a075c292fd01f6109f87341089be1241ac6fd4c049577b2

See more details on using hashes here.

File details

Details for the file armanc_toolkit-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for armanc_toolkit-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7408c7475cce5fec6847833def1cfa9380bd20a112fd83cb09dde93a38bddcb3
MD5 e27cb42df06ac30110838f69f7a30874
BLAKE2b-256 714a64fce88b4085a3f01ef27cee47db844983d4141955297b1f0398c241c243

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page