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

{
  "version": "v7",
  "count": 3,
  "items": [
    "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)

Environment Notes

Some hosted Python runtimes require you to explicitly add packages before use. In those environments, add:

generate-uuid-version
uuid6

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 uuid6 is not installed, version="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-4.0.1.tar.gz (3.3 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-4.0.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: generate_uuid_version-4.0.1.tar.gz
  • Upload date:
  • Size: 3.3 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-4.0.1.tar.gz
Algorithm Hash digest
SHA256 c5d2f1c0352267dc4e0e01871fdd5a196d91a792e35fd812cdb6863b8e503ff6
MD5 5b77f7150b8f19b608a089f938d27002
BLAKE2b-256 dfa368df0d40fa2e7666b216ae5878be77fb3655083db25a8bed28189c840aaa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for generate_uuid_version-4.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9fe49ba34df636c3beb81f80e5ae98767fca78cd52e988dee01e8cd7cd2f74e6
MD5 3278c8ed141a1a4f095c9ce922aee4eb
BLAKE2b-256 cb75858249508f00041ae27fd11f45ea80829932661f5c99a4517426cff62fe8

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