django-uuid47


Namedjango-uuid47 JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryDjango UUID47 field and utilities.
upload_time2025-10-21 06:46:07
maintainerNone
docs_urlNone
authorNone
requires_python>=3.14
licenseNone
keywords django
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            =============
django-uuid47
=============

.. image:: https://img.shields.io/github/actions/workflow/status/MarkusH/django-uuid47/main.yml.svg?branch=main&style=for-the-badge
   :target: https://github.com/MarkusH/django-uuid47/actions?workflow=CI

.. image:: https://img.shields.io/badge/Coverage-100%25-success?style=for-the-badge
  :target: https://github.com/MarkusH/django-uuid47/actions?workflow=CI

.. image:: https://img.shields.io/pypi/v/django-uuid47.svg?style=for-the-badge
   :target: https://pypi.org/project/django-uuid47/

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge
   :target: https://github.com/psf/black

.. image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=for-the-badge
   :target: https://github.com/pre-commit/pre-commit
   :alt: pre-commit

Django support for `UUID47 <https://github.com/stateless-me/uuidv47>`__.

----

Requirements
------------

Python 3.9 to 3.14 supported.

Django 4.2 to 6.0 supported.

Installation
------------

Install with **pip**:

.. code-block:: sh

    python -m pip install django-uuid47

Then add to your installed apps:

.. code-block:: python

    INSTALLED_APPS = [
        ...,
        "django_uuid47",
        ...,
    ]

Next, define the setting ``UUID47_KEY`` as a 16 bytes long string for encryption of the UUIDs.

To generate a secret, use the ``token_bytes()`` function from the ``secrets`` stdlib module in a Python shell:

.. code-block:: python

    import secrets

    secrets.token_bytes(16)
    b"h\xd0\x0c\x9f\xfa\x99\xf75\x89J\x9c\xbe>l\x97\xf5"

Then, in the ``settings.py``:

.. code-block:: python

    UUID47_KEY = b"h\xd0\x0c\x9f\xfa\x99\xf75\x89J\x9c\xbe>l\x97\xf5"

Usage
-----

In models, use the ``django_uuid47.fields.UUID47Field()`` model field, like a regular model field.

In forms, use the ``django_uuid47.forms.UUID47Field()`` form field, like a regular form field.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "django-uuid47",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.14",
    "maintainer_email": null,
    "keywords": "Django",
    "author": null,
    "author_email": "Markus Holtermann <info@markusholtermann.eu>",
    "download_url": "https://files.pythonhosted.org/packages/e8/34/d9969e6273ee873e29d2434140bae6e6a075eb75e62db447d98f9f1d291e/django_uuid47-0.1.0.tar.gz",
    "platform": null,
    "description": "=============\ndjango-uuid47\n=============\n\n.. image:: https://img.shields.io/github/actions/workflow/status/MarkusH/django-uuid47/main.yml.svg?branch=main&style=for-the-badge\n   :target: https://github.com/MarkusH/django-uuid47/actions?workflow=CI\n\n.. image:: https://img.shields.io/badge/Coverage-100%25-success?style=for-the-badge\n  :target: https://github.com/MarkusH/django-uuid47/actions?workflow=CI\n\n.. image:: https://img.shields.io/pypi/v/django-uuid47.svg?style=for-the-badge\n   :target: https://pypi.org/project/django-uuid47/\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge\n   :target: https://github.com/psf/black\n\n.. image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=for-the-badge\n   :target: https://github.com/pre-commit/pre-commit\n   :alt: pre-commit\n\nDjango support for `UUID47 <https://github.com/stateless-me/uuidv47>`__.\n\n----\n\nRequirements\n------------\n\nPython 3.9 to 3.14 supported.\n\nDjango 4.2 to 6.0 supported.\n\nInstallation\n------------\n\nInstall with **pip**:\n\n.. code-block:: sh\n\n    python -m pip install django-uuid47\n\nThen add to your installed apps:\n\n.. code-block:: python\n\n    INSTALLED_APPS = [\n        ...,\n        \"django_uuid47\",\n        ...,\n    ]\n\nNext, define the setting ``UUID47_KEY`` as a 16 bytes long string for encryption of the UUIDs.\n\nTo generate a secret, use the ``token_bytes()`` function from the ``secrets`` stdlib module in a Python shell:\n\n.. code-block:: python\n\n    import secrets\n\n    secrets.token_bytes(16)\n    b\"h\\xd0\\x0c\\x9f\\xfa\\x99\\xf75\\x89J\\x9c\\xbe>l\\x97\\xf5\"\n\nThen, in the ``settings.py``:\n\n.. code-block:: python\n\n    UUID47_KEY = b\"h\\xd0\\x0c\\x9f\\xfa\\x99\\xf75\\x89J\\x9c\\xbe>l\\x97\\xf5\"\n\nUsage\n-----\n\nIn models, use the ``django_uuid47.fields.UUID47Field()`` model field, like a regular model field.\n\nIn forms, use the ``django_uuid47.forms.UUID47Field()`` form field, like a regular form field.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Django UUID47 field and utilities.",
    "version": "0.1.0",
    "project_urls": {
        "Changelog": "https://github.com/MarkusH/django-uuid47/blob/main/CHANGELOG.rst",
        "Funding": "https://github.com/sponsors/MarkusH/",
        "Repository": "https://github.com/MarkusH/django-uuid47"
    },
    "split_keywords": [
        "django"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9fa56f78d81c3e458158172717de5d0f94045449dd2cf9bc9a110a38c7ccd39e",
                "md5": "123292b0068d3e939d9b7a1996f015a2",
                "sha256": "ac30958ec85677cb3e0ca9c33c00ce1ac9b1d0016728d3f014cf206e14354709"
            },
            "downloads": -1,
            "filename": "django_uuid47-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "123292b0068d3e939d9b7a1996f015a2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.14",
            "size": 4863,
            "upload_time": "2025-10-21T06:46:07",
            "upload_time_iso_8601": "2025-10-21T06:46:07.057093Z",
            "url": "https://files.pythonhosted.org/packages/9f/a5/6f78d81c3e458158172717de5d0f94045449dd2cf9bc9a110a38c7ccd39e/django_uuid47-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e834d9969e6273ee873e29d2434140bae6e6a075eb75e62db447d98f9f1d291e",
                "md5": "621c83486eca8b7573838a60c7117a40",
                "sha256": "7694f5d3d40b9e2ecc4bcaa0a2f9f333fea71cc631cddc66705cc67288e07b18"
            },
            "downloads": -1,
            "filename": "django_uuid47-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "621c83486eca8b7573838a60c7117a40",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.14",
            "size": 4923,
            "upload_time": "2025-10-21T06:46:07",
            "upload_time_iso_8601": "2025-10-21T06:46:07.973929Z",
            "url": "https://files.pythonhosted.org/packages/e8/34/d9969e6273ee873e29d2434140bae6e6a075eb75e62db447d98f9f1d291e/django_uuid47-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-21 06:46:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "MarkusH",
    "github_project": "django-uuid47",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "django-uuid47"
}
        
Elapsed time: 2.79024s