huey-django-orm


Namehuey-django-orm JSON
Version 24.10.24.0 PyPI version JSON
download
home_pagehttps://github.com/avryhof/huey_django_orm
SummaryA module to use Django ORM for storage with huey.
upload_time2024-10-24 10:24:52
maintainerNone
docs_urlNone
authorAmos Vryhof
requires_pythonNone
licenseMIT
keywords huey django huey.contrib.djhuey
VCS
bugtrack_url
requirements Django huey
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![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/ed/de/807d816272b9c96ae4790833a35228f8b7167897a164f6b2a5f8bacc0910/huey_django_orm-24.10.24.0.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": "24.10.24.0",
    "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": "0ab08e8062e55679d991ae7837a37eab205231e69705d5450ed8568ab0ad4536",
                "md5": "3f9cacb79b145ba501da03588489cf68",
                "sha256": "dc8c7877fb918fa04da212f349499d3c37271989ee89f53a87a2a21dbc4cf929"
            },
            "downloads": -1,
            "filename": "huey_django_orm-24.10.24.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3f9cacb79b145ba501da03588489cf68",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 7125,
            "upload_time": "2024-10-24T10:24:51",
            "upload_time_iso_8601": "2024-10-24T10:24:51.624086Z",
            "url": "https://files.pythonhosted.org/packages/0a/b0/8e8062e55679d991ae7837a37eab205231e69705d5450ed8568ab0ad4536/huey_django_orm-24.10.24.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "edde807d816272b9c96ae4790833a35228f8b7167897a164f6b2a5f8bacc0910",
                "md5": "965a2290d43567f1f8175ca37936c3a9",
                "sha256": "15ecdf79c1906b93b030f22f7849270060db999a650371297fec663294b52df1"
            },
            "downloads": -1,
            "filename": "huey_django_orm-24.10.24.0.tar.gz",
            "has_sig": false,
            "md5_digest": "965a2290d43567f1f8175ca37936c3a9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6899,
            "upload_time": "2024-10-24T10:24:52",
            "upload_time_iso_8601": "2024-10-24T10:24:52.667246Z",
            "url": "https://files.pythonhosted.org/packages/ed/de/807d816272b9c96ae4790833a35228f8b7167897a164f6b2a5f8bacc0910/huey_django_orm-24.10.24.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-24 10:24:52",
    "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": [
        {
            "name": "Django",
            "specs": []
        },
        {
            "name": "huey",
            "specs": []
        }
    ],
    "tox": true,
    "lcname": "huey-django-orm"
}
        
Elapsed time: 0.32820s