Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

uuid-lib

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uuid-lib

Python bindings for the UUID library

  • 0.3.4
  • PyPI
  • Socket score

Maintainers
1

python uuid-lib

Python library written in rust that lets you use uuid1..8 funcs.

Available functions

uuid1 - Generated based on a timestamp, a unique node identifier (typically a MAC address), and a random component.
uuid3 - Generated using the MD5 hash function based on a namespace and a unique string (e.g., a URL).
uuid4 - A fully random UUID, potentially using cryptographically secure random number generators.
uuid5 - Similar to UUID3 but uses SHA-1 instead of MD5 for hashing unique data and the namespace.
uuid6 - A modified version of UUID1 with the timestamp in sequential order, improving database indexing performance.
uuid7 - Generated based on a timestamp using Unix Epoch format and random bits to ensure uniqueness.
uuid8 - Reserved for custom UUIDs with arbitrary generation schemes, leaving implementation details open. Accepts any UUID as bytes (If UUID generated by this lib, use object.bytes proprety)

Installation

Install uuid-lib with pip:

  pip install uuid-lib

Install uuid-lib with poetry:

  poetry install uuid-lib

Usage/Examples

...

from uuid_lib import uuid4, uuid7, uuid8(), ...


user_id = uuid7()  # <- Creates UUID object


# For uuid8(...) 

some_id = uuid8(user_id.bytes)
# or
some_id = uuid8(uuid4().bytes)

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc