Easily generate meaningful & consistent UUID's without the excessive boilerplate normally required.
Project description
CustomUUID
CustomUUID is a versatile UUID generation library designed to create unique identifiers with optional embedded information such as dates or custom values. It's ideal for applications requiring unique IDs with additional embedded context.
Table of Contents
Introduction
CustomUUID provides a flexible way to generate UUIDs (Universally Unique Identifiers) with optional embedding of dates, application-specific IDs, or other relevant data. It supports various customization levels, from simple UUIDs to complex ones containing multiple data types.
Features
- Standard UUID Generation: Generate regular UUIDs compliant with RFC 4122.
- Date Embedding: Option to embed the current date into the UUID for temporal context.
- Custom Value Embedding: Embed up to three custom values into the UUID for additional context.
- Length Management: Automatically handles the length of UUIDs to ensure they stay within standard limits.
- Predefined Templates: Includes several template functions for common use cases, facilitating ease of use.
Installation
To install CustomUUID, run the following command:
pip install custom_uuid
Usage
Basic usage example:
from customuuid import create_uuid
# Generate a standard UUID
uuid = create_uuid()
print(uuid)
Advanced usage with custom values:
from customuuid import create_custom_uuid
# Generate a UUID with custom values
uuid = create_custom_uuid(include_date=True, custom_values=["app_id", "user_id"])
print(uuid)
Configuration
CustomUUID allows various configurations to tailor the UUID generation to your specific needs. Refer to the documentation for detailed configuration options.
License
CustomUUID is licensed under the 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
Built Distribution
Hashes for custom_uuid-11.9.23-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f4a185922f25aa4eecefeca8a0c187ca0183d124f5c7ac2b241b7ea4e3c9615 |
|
MD5 | da02721452157377ad2ac18ed7d2b4d4 |
|
BLAKE2b-256 | 0be9e2c2f414c95d0c0bb20425ab26b3087166cfe8135c1c588fbac60afc5c66 |