Skip to main content

This package generates unique string identifiers.

from ustrid import ustrid

unique_string_id = ustrid()

Under the hood:

import uuid
import threading


def ustrid():
    """Generate a unique string identifier (thread-safe)"""
    return Ustrid.run()


class Ustrid:

    """Private class to generate unique string identifiers (thread-safe)"""
    _lock = threading.Lock()
    _count = 0

    @classmethod
    def run(cls):
        """Generate a unique string identifier (thread-safe)"""
        with cls._lock:
            cls._count += 1
            return "{}-{}".format(cls._count, uuid.uuid4())

Installation:

pip install ustrid

Metadata

Release files for ustrid 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ustrid 0.0.3
File Size Uploaded
ustrid-0.0.3.tar.gz 3.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ustrid 0.0.3
File Interpreter ABI Platform
ustrid-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 7.3 kB

Release files / ustrid-0.0.3.tar.gz

Download URL ustrid-0.0.3.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
efa96dbccb424dd274a7bafe65afe00032410b73d9435de4bddd45ec61e65998
BLAKE2b-256 checksum
How to use checksums
6435e7296039dec4eb83bdb4ad9bb8f42d2bc8b9d7b12281a61741b912b2961d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.6.1 requests/2.9.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.5.2

Release files / ustrid-0.0.3-py3-none-any.whl

Download URL ustrid-0.0.3-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0f150479f55fcefc04a330ad1cc3325e338fc13aebf3c1df4cf4bc84e08b7cac
BLAKE2b-256 checksum
How to use checksums
da7430ead78cc67bf8ea46190a18e9d9c8a988c948edfe59a6b5bb39982c6bbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.6.1 requests/2.9.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.5.2

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page