A module to use Django ORM for storage with huey.
Project description
huey_django_orm
A module to use Django ORM for storage with huey
This project originally started because I wanted to just update 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
pip install huey-django-orm
settings.py
Add to INSTALLED_APPS
INSTALLED_APPS = [
"...",
"huey_django_orm",
"...",
]
Configure Huey to use DjangoORMHuey
from huey_django_orm.storage import DjangoORMHuey
HUEY = DjangoORMHuey()
or if you need other options
HUEY = {
"...": "...",
'huey_class': 'huey_django_orm.storage.DjangoORMHuey',
"......": "...",
}
Run Migrations
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.
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
Built Distribution
Hashes for huey_django_orm-23.12.10.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1900fc9fc31e01a3d53a11ea2046f7304050ebea7730824a60ece5d260fa8cfc |
|
MD5 | 676fdbfc1b9b1790b02e6b99057a1154 |
|
BLAKE2b-256 | fb714f6b6f0b1a240ca085ac3ce1eef3cb73524d46be20f8f683ef60e716d264 |
Hashes for huey_django_orm-23.12.10.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0243b6483864ba0bf8e904f352681d40bee719bd7811a0dc30b6686c2435565e |
|
MD5 | ec3015720608c90b159b0d5372b77195 |
|
BLAKE2b-256 | baf30f0c422f76c7b0c1d2bc5adefb8859fda588ebe60614e71a73a823a6538e |