# Python Library: uuid_shortener
A simple utility to shorten UUIDs using base62 encoding.
## Installation
Install using pip:
```bash
pip install uuid_shortener
```
## Usage
```python
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
```python
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.
Raw data
{
"_id": null,
"home_page": "https://github.com/sammeowww/py_uuid_shortener",
"name": "uuid-shortener",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "uuid shortener base62",
"author": "Sammeow Chan",
"author_email": "1010hk@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/2f/2a/f0706966a2d2f126a20ddf80860c2d88184dda36ee3719310de34805b79c/uuid_shortener-0.1.3.tar.gz",
"platform": null,
"description": "# Python Library: uuid_shortener\n\nA simple utility to shorten UUIDs using base62 encoding.\n\n## Installation\n\nInstall using pip:\n\n```bash\npip install uuid_shortener\n```\n\n## Usage\n\n```python\nfrom uuid_shortener import UUIDShortener\n\noriginal_uuid = 'your-uuid-here'\nshortened = UUIDShortener.encode(original_uuid)\nprint(f'Shortened UUID: {shortened}')\n\nrestored = UUIDShortener.decode(shortened)\nprint(f'Restored UUID: {restored}')\n```\n\nReplace your-uuid-here with an actual UUID to test.\n\n## Example\n\n```python\na = str(uuid.uuid4())\nprint(a)\n# >> 5798a735-d00f-4c1d-b86b-15603c6fda82\n\nb = UUIDShortener.encode(a)\nprint(b)\n# >> 2Fi5TIkiHjpn5ZkCA9WOky\n\nprint(UUIDShortener.decode(b))\n# >> 5798a735-d00f-4c1d-b86b-15603c6fda82\n```\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE.txt file for details.\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A utility to shorten UUIDs using base62 encoding.",
"version": "0.1.3",
"project_urls": {
"Homepage": "https://github.com/sammeowww/py_uuid_shortener"
},
"split_keywords": [
"uuid",
"shortener",
"base62"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2f2af0706966a2d2f126a20ddf80860c2d88184dda36ee3719310de34805b79c",
"md5": "066706201853ab1de7215848376a1f92",
"sha256": "df88586314b4fc29415d6fed7016ae0122a6211e9c5a01d661859edc8043a59f"
},
"downloads": -1,
"filename": "uuid_shortener-0.1.3.tar.gz",
"has_sig": false,
"md5_digest": "066706201853ab1de7215848376a1f92",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3103,
"upload_time": "2024-03-26T09:32:13",
"upload_time_iso_8601": "2024-03-26T09:32:13.662196Z",
"url": "https://files.pythonhosted.org/packages/2f/2a/f0706966a2d2f126a20ddf80860c2d88184dda36ee3719310de34805b79c/uuid_shortener-0.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-26 09:32:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sammeowww",
"github_project": "py_uuid_shortener",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "uuid-shortener"
}