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.2.tar.gz (10.2 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.2-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for armanc_toolkit-0.1.2.tar.gz
Algorithm Hash digest
SHA256 cffb9001bc2845f716fcf50d3c67c27091617f47a3017b512cf15f85a32f3d88
MD5 9f1f4a6a4d4341a00aee61d4ed05eeda
BLAKE2b-256 ba3b4d920509219f2ad86ed576145761c47fab55caed9e409fe2c0b8ff40c1c5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for armanc_toolkit-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 12203baf112bd3b9de46cfc88987fc806a7dfb5151de9b40a10363aa58f8bde2
MD5 7bf342a4800d43c60f82fc9cb7028603
BLAKE2b-256 19d1c16201330e055c524b6e548710a138c76d46fd7ae63d094ba30afda8eefb

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