Skip to main content

Django UUID7 field support for PostgreSQL, MariaDB, and MySQL

Project description

Django UUID7

A Django package that provides UUID7 field support for PostgreSQL, MariaDB, and MySQL databases.

Features

  • UUID7 field type for Django models
  • UUID7 serializer field for Django REST Framework
  • UUID7 form field for Django forms
  • Support for PostgreSQL, MariaDB, and MySQL databases
  • Standalone UUID7 functionality

Installation

pip install django-uuid7

Usage

Model Field

from django.db import models
from django_uuid7 import UUID7Field

class MyModel(models.Model):
    id = UUID7Field(primary_key=True)
    # ... other fields

Serializer Field

from rest_framework import serializers
from django_uuid7 import UUID7SerializerField

class MySerializer(serializers.ModelSerializer):
    id = UUID7SerializerField()
    
    class Meta:
        model = MyModel
        fields = ['id', ...]

Form Field

from django import forms
from django_uuid7 import UUID7FormField

class MyForm(forms.Form):
    id = UUID7FormField()

Standalone Usage

from django_uuid7 import uuid7

# Generate a new UUID7
new_uuid = uuid7()

Requirements

  • Python 3.8+
  • Django 3.2+
  • PostgreSQL, MariaDB, or MySQL database

License

MIT License

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_uuid7-0.1.1.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

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

django_uuid7-0.1.1-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file django_uuid7-0.1.1.tar.gz.

File metadata

  • Download URL: django_uuid7-0.1.1.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.20

File hashes

Hashes for django_uuid7-0.1.1.tar.gz
Algorithm Hash digest
SHA256 cda9eb26cd144208d2245485c5caf165bbe4f4ed5149520745f32a8bbc1f1000
MD5 099b6ee22452b5e061b5b1ad4969549b
BLAKE2b-256 b3f8bf805d8a8a607251ae91adcb4d2f5327646adfdb7b8877bf4993b6fcb67c

See more details on using hashes here.

File details

Details for the file django_uuid7-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: django_uuid7-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.20

File hashes

Hashes for django_uuid7-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6b2f330f2344983715a6e619a30368928c108b187587fe2cd3273cbe663998fa
MD5 f6746dd15bc337d1a1bcbdae45eed5e0
BLAKE2b-256 cca11abea3390731279e0e8f1e17d62c82a1b6846d5052d38f9379a484274d90

See more details on using hashes here.

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