Skip to main content

Facilitates the usage of HTMX with Django

Project description

hx-requests

Full documentation: https://hx-requests.readthedocs.io/en/latest/#


pre-commit Code style: black Imports: isort Code style: djlint

Hx-requests is a package to simplify the usage of htmx with Django. It enables an application to make asyncronous requests without clogging up views and urls with extra code. It simplifies making django forms post asyncronously with htmx, and many other awesome features.

The idea of hx-requests is that HXRequests absorb all htmx requests. Define an HXRequest and observe the magic of hx-requests.

  • No need to define extra urls to handle these requests
  • No need to add anything extra in views
  • Reusable HXRequests across views
  • Built in HXRequests to reduce boilerplate code

See full documentation here: https://hx-requests.readthedocs.io/en/latest/#

Installation

pip install hx-requests
INSTALLED_APPS = (
    ...
    'hx_requests',
)

Note It's assumed that htmx is already included in the base html file. It's also recommended to include hyperscript. Htmx: <script src="https://unpkg.com/htmx.org@1.8.6"></script>
Hyperscript: <script src="https://unpkg.com/hyperscript.org@0.9.8"></script>

Contributing to this repository

Warning CI is not setup yet, but will be at a later date.

Getting setup

  • This project is using poetry
  • There is a dev container that can be used with vs-code

Committing

Must follow Conventional Commit https://www.conventionalcommits.org/en/v1.0.0/

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

hx_requests-0.33.0.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

hx_requests-0.33.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file hx_requests-0.33.0.tar.gz.

File metadata

  • Download URL: hx_requests-0.33.0.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.8.18 Linux/6.5.0-1025-azure

File hashes

Hashes for hx_requests-0.33.0.tar.gz
Algorithm Hash digest
SHA256 ed2fed309ae01c9f6592d4e05b37561310662154bac4a02aa395d1662c620c74
MD5 568ea585efd82f2a630f8838961be096
BLAKE2b-256 ab26a1abeb476815f1c46ba99905c70db9c9ffce962daaa4540ca75f14ac3ad1

See more details on using hashes here.

File details

Details for the file hx_requests-0.33.0-py3-none-any.whl.

File metadata

  • Download URL: hx_requests-0.33.0-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.8.18 Linux/6.5.0-1025-azure

File hashes

Hashes for hx_requests-0.33.0-py3-none-any.whl
Algorithm Hash digest
SHA256 61d4d3938cce3a986af8b5a957272a95bab1599dbedcbb349071bef75916afa8
MD5 5769135b4d675671b303432cce8d9f7d
BLAKE2b-256 816f7364c936478e81565a70a917be4f49d010b80711ed56ee0417efb2020f15

See more details on using hashes here.

Supported by

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