Create time-ordered UUIDs ideal for database keys
Project description
Ordered UUID
Generates UUIDs ordered by time generated.
Overview
Examples
The default constructor generates a UUID using a random multicast MAC address as the node:
>>> from ordereduuid import OrderedUUID
>>> OrderedUUID()
OrderedUUID('1ea96141-1da3-c3ef-e978-ab415e52aca4')
If a private MAC is not preferred, use the set the private_mac
keyword argument to False:
>>> OrderedUUID(private_mac=False)
OrderedUUID('1ea961a5-25a5-c3bf-e26f-ffffffffffff')
REQUIRES TESTING/REVIEW -- UUIDs generated are designed to be used as keys in databases. Consider the following Django example:
from django.db import models
from ordereduuid import OrderedUUID
class Subscriber(models.Model):
id = models.UUIDField(
primary_key=True, default=OrderedUUID, editable=False
)
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
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 ordereduuid-0.5.0.tar.gz.
File metadata
- Download URL: ordereduuid-0.5.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.3.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c73b298df5dc25034eb47e7f76c187fe236c6fc9258a0bff2fc9cdb5254fdd8
|
|
| MD5 |
f7480036cc1d9ff293a0b116adbaec96
|
|
| BLAKE2b-256 |
0b642d83cc10c085ff699bf9d8b86ff91b6a74c0246479cabe2e4d5a89cd3dd5
|
File details
Details for the file ordereduuid-0.5.0-py3-none-any.whl.
File metadata
- Download URL: ordereduuid-0.5.0-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.3.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e91ab721ab978736adcf4794b16a30413296615cd7e5e974d85ffba14ee833a1
|
|
| MD5 |
be9f0b0803624e5e83e798c266f24b54
|
|
| BLAKE2b-256 |
743b2dbe93dcae6e8a2cd09fab04387fe82203a06405eccac8a7afc6d9ba88d0
|