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.0.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.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: armanc_toolkit-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 501ecc24439c3371f65c007668c61f243f676999cb5e13e896864e92e6072da6
MD5 0041b5bb72dbdcb2972b6edcb6b379b5
BLAKE2b-256 8e9b324a5c3d3e2b0d935e25b4d41cc62f1e5230405ab3c368876427e44bbc23

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for armanc_toolkit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6d343c9c0556b681cd5be3574c379aafabd5c47a8706f13fc6197390661b8eb1
MD5 4cb1c57c9cf6114bfb8c2d8820493120
BLAKE2b-256 28048b8579d69cee977a618a401142a4e3d22558d881330fe8edf4db11e73e36

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