[![PyPI version](http://img.shields.io/pypi/v/huey-django-orm.svg?style=flat-square)](https://pypi.python.org/pypi/huey-django-orm)
[![license](http://img.shields.io/pypi/l/huey-django-orm.svg?style=flat-square)](https://pypi.python.org/pypi/huey-django-orm)
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg?style=flat-square)](https://paypal.me/avryhof?country.x=US&locale.x=en_US)
huey_django_orm
=
A module to use Django ORM for storage with [huey](https://pypi.org/project/huey/)
This project originally started because I wanted to just update [huey-pg](https://pypi.org/project/huey-pg/). That
proved to be more of a full rewrite than just an update.
Anyway, I didn't want to use SqliteHuey, or FileHuey, since I already have a perfectly good data store in my Django
project.
So, I took a copy of SqliteHuey, and re-implemented the class functionality using Django ORM.
Huey doesn't do anything too crazy, so it should work with any database backend supported by Django. We also don't use
any non-standard Django stuff, so it should work with any modern Django version.
## Installation
Install with pip
```bash
pip install huey-django-orm
```
### settings.py
Add to INSTALLED_APPS
```python
INSTALLED_APPS = [
"...",
"huey_django_orm",
"...",
]
```
Configure Huey to use DjangoORMHuey
```python
from huey_django_orm.storage import DjangoORMHuey
HUEY = DjangoORMHuey()
```
or if you need other options
```python
HUEY = {
"...": "...",
'huey_class': 'huey_django_orm.storage.DjangoORMHuey',
"......": "...",
}
```
### Run Migrations
```bash
python manage.py migrate huey_django_orm
```
That's it! Now you can use Huey just like you normally would.
## Admin
Since this project is specific to Django, and will likely never be used without it, you get a few Django goodies rolled
right in.
* Each Model has a ModelAdmin
* There is an auto_now_add field in each model so we can see when an object was created within the admin
* Ordering is defined at the model level, so objects will appear in the admin in the same way they will be processed.
Raw data
{
"_id": null,
"home_page": "https://github.com/avryhof/huey_django_orm",
"name": "huey-django-orm",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "huey, django, huey.contrib.djhuey",
"author": "Amos Vryhof",
"author_email": "avryhof@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/fb/71/4f6b6f0b1a240ca085ac3ce1eef3cb73524d46be20f8f683ef60e716d264/huey_django_orm-23.12.10.2.tar.gz",
"platform": null,
"description": "[![PyPI version](http://img.shields.io/pypi/v/huey-django-orm.svg?style=flat-square)](https://pypi.python.org/pypi/huey-django-orm)\n[![license](http://img.shields.io/pypi/l/huey-django-orm.svg?style=flat-square)](https://pypi.python.org/pypi/huey-django-orm)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg?style=flat-square)](https://paypal.me/avryhof?country.x=US&locale.x=en_US)\n\nhuey_django_orm\n=\nA module to use Django ORM for storage with [huey](https://pypi.org/project/huey/)\n\nThis project originally started because I wanted to just update [huey-pg](https://pypi.org/project/huey-pg/). That\nproved to be more of a full rewrite than just an update.\n\nAnyway, I didn't want to use SqliteHuey, or FileHuey, since I already have a perfectly good data store in my Django\nproject.\n\nSo, I took a copy of SqliteHuey, and re-implemented the class functionality using Django ORM.\n\nHuey doesn't do anything too crazy, so it should work with any database backend supported by Django. We also don't use\nany non-standard Django stuff, so it should work with any modern Django version.\n\n## Installation\n\nInstall with pip\n\n```bash\npip install huey-django-orm\n```\n\n### settings.py\n\nAdd to INSTALLED_APPS\n\n```python\nINSTALLED_APPS = [\n \"...\",\n \"huey_django_orm\",\n \"...\",\n]\n```\n\nConfigure Huey to use DjangoORMHuey\n\n```python\nfrom huey_django_orm.storage import DjangoORMHuey\n\nHUEY = DjangoORMHuey()\n```\n\nor if you need other options\n\n```python\nHUEY = {\n \"...\": \"...\",\n 'huey_class': 'huey_django_orm.storage.DjangoORMHuey',\n \"......\": \"...\",\n}\n```\n\n### Run Migrations\n\n```bash\npython manage.py migrate huey_django_orm\n```\n\nThat's it! Now you can use Huey just like you normally would.\n\n## Admin\n\nSince this project is specific to Django, and will likely never be used without it, you get a few Django goodies rolled\nright in.\n\n* Each Model has a ModelAdmin\n* There is an auto_now_add field in each model so we can see when an object was created within the admin\n* Ordering is defined at the model level, so objects will appear in the admin in the same way they will be processed.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A module to use Django ORM for storage with huey.",
"version": "23.12.10.2",
"project_urls": {
"Bug Tracker": "https://github.com/avryhof/huey_django_orm/issues",
"GitHub Repo": "https://github.com/avryhof/huey_django_orm",
"Homepage": "https://github.com/avryhof/huey_django_orm"
},
"split_keywords": [
"huey",
" django",
" huey.contrib.djhuey"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "baf30f0c422f76c7b0c1d2bc5adefb8859fda588ebe60614e71a73a823a6538e",
"md5": "ec3015720608c90b159b0d5372b77195",
"sha256": "0243b6483864ba0bf8e904f352681d40bee719bd7811a0dc30b6686c2435565e"
},
"downloads": -1,
"filename": "huey_django_orm-23.12.10.2-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "ec3015720608c90b159b0d5372b77195",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 7123,
"upload_time": "2024-04-17T22:01:11",
"upload_time_iso_8601": "2024-04-17T22:01:11.156039Z",
"url": "https://files.pythonhosted.org/packages/ba/f3/0f0c422f76c7b0c1d2bc5adefb8859fda588ebe60614e71a73a823a6538e/huey_django_orm-23.12.10.2-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fb714f6b6f0b1a240ca085ac3ce1eef3cb73524d46be20f8f683ef60e716d264",
"md5": "676fdbfc1b9b1790b02e6b99057a1154",
"sha256": "1900fc9fc31e01a3d53a11ea2046f7304050ebea7730824a60ece5d260fa8cfc"
},
"downloads": -1,
"filename": "huey_django_orm-23.12.10.2.tar.gz",
"has_sig": false,
"md5_digest": "676fdbfc1b9b1790b02e6b99057a1154",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6905,
"upload_time": "2024-04-17T22:01:12",
"upload_time_iso_8601": "2024-04-17T22:01:12.749508Z",
"url": "https://files.pythonhosted.org/packages/fb/71/4f6b6f0b1a240ca085ac3ce1eef3cb73524d46be20f8f683ef60e716d264/huey_django_orm-23.12.10.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-17 22:01:12",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "avryhof",
"github_project": "huey_django_orm",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"tox": true,
"lcname": "huey-django-orm"
}