Skip to main content

souvenir python

Translated souvenir to python.

A structured ID generation and parsing library using prefixes.

This library primariy provides the Id class, which stores a 128-bit identifier with its corresponding type (tag). The string representation of an Id is the type's tag and the 128-bit value encoded into a variant of Crockford Base 32.

Release

Found on PyPI

Setup

User

  1. Installation

    pip install souvenir-python
    
  2. Using the library

    from souvenir import random_id
    
    class Story(Base):
        __tablename__ = "stories"
        id = Column(Text, primary_key=True, default=lambda: str(random_id(Story)))
    
        @staticmethod
        def prefix():
            return "ethosStory"
    

Dev

pip install ".[dev]"

License

This project is licensed under the MIT License.

Metadata

Release files for souvenir-python 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 souvenir-python 0.0.3
File Size Uploaded Provenance
souvenir_python-0.0.3.tar.gz 4.7 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 9.9 kB

Release files / souvenir_python-0.0.3.tar.gz

Download URL souvenir_python-0.0.3.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
37bab0ff29be5f75c46a74fcb036ebd77f4680a5eecb957e133d6bf19bade12c
BLAKE2b-256 checksum
How to use checksums
9f7e97f8aa353161e3a72b0abb85bbe01d63a530a06402cd98c6f5b3e96b3775
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.13.2

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

Download URL souvenir_python-0.0.3-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
13b2a3a09a51084360e66b68bc6139b404b644d21253742893b852f28acfe1ba
BLAKE2b-256 checksum
How to use checksums
18ac98ea698aa00cabde706541d0e95a70c12f6ac5132748931f501236080926
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.13.2

Security for souvenir-python 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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