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

uuid-shortener

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uuid-shortener

A utility to shorten UUIDs using base62 encoding.

  • 0.1.3
  • PyPI
  • Socket score

Maintainers
1

Python Library: uuid_shortener

A simple utility to shorten UUIDs using base62 encoding.

Installation

Install using pip:

pip install uuid_shortener

Usage

from uuid_shortener import UUIDShortener

original_uuid = 'your-uuid-here'
shortened = UUIDShortener.encode(original_uuid)
print(f'Shortened UUID: {shortened}')

restored = UUIDShortener.decode(shortened)
print(f'Restored UUID: {restored}')

Replace your-uuid-here with an actual UUID to test.

Example

a = str(uuid.uuid4())
print(a)
# >> 5798a735-d00f-4c1d-b86b-15603c6fda82

b = UUIDShortener.encode(a)
print(b)
# >> 2Fi5TIkiHjpn5ZkCA9WOky

print(UUIDShortener.decode(b))
# >> 5798a735-d00f-4c1d-b86b-15603c6fda82

License

This project is licensed under the MIT License - see the LICENSE.txt file for details.

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