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
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
django_uuid7-0.1.0.tar.gz
(5.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_uuid7-0.1.0.tar.gz.
File metadata
- Download URL: django_uuid7-0.1.0.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21bfb5f142dbcaf3e752bf3193f8409a33d42d2bc478d9bdd9337fbfd1d73687
|
|
| MD5 |
59427c9417087a50344ecd2153650cb9
|
|
| BLAKE2b-256 |
8017437cf4bffa027d0b3de08ca1b06053a0027f55a9a0521dd9fdbe01312704
|
File details
Details for the file django_uuid7-0.1.0-py3-none-any.whl.
File metadata
- Download URL: django_uuid7-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b717a99099e213d63a3b49159cf087ac36b48b9c587554347794414b71b363cf
|
|
| MD5 |
d02aaab0d0f01e64383e4231436d30fb
|
|
| BLAKE2b-256 |
b817bb50c8d2fdf0d3ee4250077bc6f14adf7f41ac92045d614e92e0f4664ff0
|