# hx-requests
Full documentation: https://hx-requests.readthedocs.io/en/latest/#
<br>
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
[![Code style: ruff](https://img.shields.io/badge/code%20style-ruff-blue.svg)](https://docs.astral.sh/ruff/formatter/)
[![Code style: djlint](https://img.shields.io/badge/html%20style-djlint-blue.svg)](https://www.djlint.com)
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
```python
pip install hx-requests
```
```python
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>`
</br>
Hyperscript: `<script src="https://unpkg.com/hyperscript.org@0.9.8"></script>`
# Contributing to this repository
## Getting setup
- This project is using poetry
- pre-commit is used for CI (code formatting, linting, etc...)
- 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/
Raw data
{
"_id": null,
"home_page": "https://github.com/yaakovLowenstein/hx-requests",
"name": "hx-requests",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.12,>=3.8",
"maintainer_email": null,
"keywords": "django, htmx",
"author": "yaakovLowenstein",
"author_email": "lowensteinyaakov@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/8e/c3/ab20b4f1446e15fbe0b256f752fbb8fc333b2a080e9cc7696f0268593faf/hx_requests-0.33.2.tar.gz",
"platform": null,
"description": "# hx-requests\n\nFull documentation: https://hx-requests.readthedocs.io/en/latest/#\n\n<br>\n\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)\n[![Code style: ruff](https://img.shields.io/badge/code%20style-ruff-blue.svg)](https://docs.astral.sh/ruff/formatter/)\n[![Code style: djlint](https://img.shields.io/badge/html%20style-djlint-blue.svg)](https://www.djlint.com)\n\nHx-requests is a package to simplify the usage of htmx with Django.\nIt enables an application to make asyncronous requests without clogging up\nviews and urls with extra code. It simplifies making django forms post asyncronously\nwith htmx, and many other awesome features.\n\nThe idea of hx-requests is that `HXRequests` absorb all htmx requests.\nDefine an `HXRequest` and\nobserve the magic of `hx-requests`.\n\n- No need to define extra urls to handle these requests\n- No need to add anything extra in views\n- Reusable `HXRequests` across views\n- Built in `HXRequests` to reduce boilerplate code\n\nSee full documentation here: https://hx-requests.readthedocs.io/en/latest/#\n\n# Installation\n\n```python\npip install hx-requests\n```\n\n```python\nINSTALLED_APPS = (\n ...\n 'hx_requests',\n)\n ```\n\n**Note**\nIt's assumed that htmx is already included in the base html file. It's also recommended to include hyperscript.\nHtmx: `<script src=\"https://unpkg.com/htmx.org@1.8.6\"></script>`\n</br>\nHyperscript: `<script src=\"https://unpkg.com/hyperscript.org@0.9.8\"></script>`\n\n# Contributing to this repository\n\n## Getting setup\n\n- This project is using poetry\n- pre-commit is used for CI (code formatting, linting, etc...)\n- There is a dev container that can be used with vs-code\n\n\n## Committing\n\nMust follow Conventional Commit\nhttps://www.conventionalcommits.org/en/v1.0.0/\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Facilitates the usage of HTMX with Django",
"version": "0.33.2",
"project_urls": {
"Homepage": "https://github.com/yaakovLowenstein/hx-requests",
"Repository": "https://github.com/yaakovLowenstein/hx-requests"
},
"split_keywords": [
"django",
" htmx"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "fea5699def0742b963f6f8038becd1131e28d7312e146cfa27a39eebe3d7c2b1",
"md5": "bbd8b93a7bc797be6e06e571335a0679",
"sha256": "970b477696211a310e923078c26ae0a86b7de0d72d2ca61c802d59b3c3fc45b8"
},
"downloads": -1,
"filename": "hx_requests-0.33.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bbd8b93a7bc797be6e06e571335a0679",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.12,>=3.8",
"size": 15263,
"upload_time": "2024-12-10T17:42:56",
"upload_time_iso_8601": "2024-12-10T17:42:56.841631Z",
"url": "https://files.pythonhosted.org/packages/fe/a5/699def0742b963f6f8038becd1131e28d7312e146cfa27a39eebe3d7c2b1/hx_requests-0.33.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8ec3ab20b4f1446e15fbe0b256f752fbb8fc333b2a080e9cc7696f0268593faf",
"md5": "9d83c6a91bd6c6e6e98b14be2bac6fbb",
"sha256": "27f8c3a607c92900d7f724c2cecd2f7f00dde3279b71f40756eeb56b355b556f"
},
"downloads": -1,
"filename": "hx_requests-0.33.2.tar.gz",
"has_sig": false,
"md5_digest": "9d83c6a91bd6c6e6e98b14be2bac6fbb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.12,>=3.8",
"size": 13559,
"upload_time": "2024-12-10T17:42:57",
"upload_time_iso_8601": "2024-12-10T17:42:57.950200Z",
"url": "https://files.pythonhosted.org/packages/8e/c3/ab20b4f1446e15fbe0b256f752fbb8fc333b2a080e9cc7696f0268593faf/hx_requests-0.33.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-10 17:42:57",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "yaakovLowenstein",
"github_project": "hx-requests",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "hx-requests"
}