Skip to main content

Generate UUID values (v4, v7) with count support.

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

generate-uuid-version

Generate UUID values (v4, v7) with simple controls.


Install

pip install generate-uuid-version

Usage

from generate_uuid_version import generate_uuid

result = generate_uuid(
    count=3,
    version="v7"
)

print(result)

Output

{
  "count": 3,
  "version": "v7",
  "items": {
    "first": "uuid-1",
    "last": "uuid-3"
  },
  "list": ["uuid-1", "uuid-2", "uuid-3"]
}

Options

Field Type Required Default Description
count int No 1 Number of UUIDs to generate (min 1, max 10)
version string No v7 UUID version: v4 or v7

Examples

Default (v7)

generate_uuid(count=2)

v4 (random)

generate_uuid(count=2, version="v4")

v7 (time-based, recommended)

generate_uuid(count=2, version="v7")

Supported Versions

  • v4 = random
  • v7 = modern time-based (recommended)

Behavior

  • Invalid or missing count defaults to 1
  • Maximum count is 10
  • Invalid or missing version defaults to v7

Notes

  • Python standard library does not yet include native UUID v7 support
  • To enable true v7 UUIDs, install:
pip install uuid6
  • If not installed, v7 falls back to v4 internally

License

MIT

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

generate_uuid_version-3.0.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

generate_uuid_version-3.0.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file generate_uuid_version-3.0.1.tar.gz.

File metadata

  • Download URL: generate_uuid_version-3.0.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for generate_uuid_version-3.0.1.tar.gz
Algorithm Hash digest
SHA256 18ce495dc8609ab812529981ca58bf28595d55d0e4cd1000df4e458d6288b166
MD5 34ed314500cbe29b1c4e4e537ffb12d4
BLAKE2b-256 dac0cd8547434874b655f746ef564561a74394e4fb41b3a8d6b783aa56da8b2a

See more details on using hashes here.

File details

Details for the file generate_uuid_version-3.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for generate_uuid_version-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b0594710e73c50d8fbb8adfd272796eb8aeca8e6c1783c7ebaf37bfcedd72cd0
MD5 a46bc7e4c03338a9b8519437bf355c87
BLAKE2b-256 65f36c312da62ed5b6315ae524e335588b85365129f6b8d49526a23b1132e4b2

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