Skip to main content

Django UUID47 field and utilities.

Project description

https://img.shields.io/github/actions/workflow/status/MarkusH/django-uuid47/main.yml.svg?branch=main&style=for-the-badge https://img.shields.io/badge/Coverage-100%25-success?style=for-the-badge https://img.shields.io/pypi/v/django-uuid47.svg?style=for-the-badge https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge pre-commit

Django support for UUID47.


Requirements

Python 3.9 to 3.14 supported.

Django 4.2 to 6.0 supported.

Installation

Install with pip:

python -m pip install django-uuid47

Then add to your installed apps:

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:

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:

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_uuid47-0.1.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_uuid47-0.1.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file django_uuid47-0.1.0.tar.gz.

File metadata

  • Download URL: django_uuid47-0.1.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for django_uuid47-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7694f5d3d40b9e2ecc4bcaa0a2f9f333fea71cc631cddc66705cc67288e07b18
MD5 621c83486eca8b7573838a60c7117a40
BLAKE2b-256 e834d9969e6273ee873e29d2434140bae6e6a075eb75e62db447d98f9f1d291e

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_uuid47-0.1.0.tar.gz:

Publisher: main.yml on MarkusH/django-uuid47

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_uuid47-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: django_uuid47-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for django_uuid47-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ac30958ec85677cb3e0ca9c33c00ce1ac9b1d0016728d3f014cf206e14354709
MD5 123292b0068d3e939d9b7a1996f015a2
BLAKE2b-256 9fa56f78d81c3e458158172717de5d0f94045449dd2cf9bc9a110a38c7ccd39e

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_uuid47-0.1.0-py3-none-any.whl:

Publisher: main.yml on MarkusH/django-uuid47

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page