Skip to content

A dead simple and efficient UUIDv7 generator in Python.

License

Notifications You must be signed in to change notification settings

0xShamil/uuidv7-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python UUIDv7 Generator

A zero dependency, dead simple version 7 UUID generator.

Usage

Just copy the generator.py file (or the contents) to your project.

from uuid7 import uuid7
import uuid

rand_uuid: uuid.UUID = uuid7()
print(rand_uuid)

Running the tests locally

Prerequisites

  • Python 3.8+
  • pip

Setup

Create a virtual environment:

python -m venv venv
source venv/bin/activate

Install dependencies using pip:

pip install -r requirements.txt

Install the package in editable mode to allow importing from tests or external scripts:

pip install -e .

Running Tests

Tests are written using pytest. Run tests from the project root:

pytest tests/

License

WTFPL

About

A dead simple and efficient UUIDv7 generator in Python.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages