{"id":15297487,"url":"https://github.com/tanbro/b64uuid","last_synced_at":"2025-04-13T23:16:25.154Z","repository":{"id":57413593,"uuid":"285450069","full_name":"tanbro/b64uuid","owner":"tanbro","description":"A small Python library and command-line tool to encode/decode UUID to/from a 22 characters shorter URL safe base64 string.","archived":false,"fork":false,"pushed_at":"2021-09-23T03:27:22.000Z","size":57,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T13:23:58.777Z","etag":null,"topics":["base64","pypi","python","python-3","python-library","python3","shortid","urlsafe","urlsafe-base64","uuid","uuid-string"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tanbro.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-06T02:09:29.000Z","updated_at":"2022-06-17T19:56:15.000Z","dependencies_parsed_at":"2022-08-27T23:50:44.006Z","dependency_job_id":null,"html_url":"https://github.com/tanbro/b64uuid","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanbro%2Fb64uuid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanbro%2Fb64uuid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanbro%2Fb64uuid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanbro%2Fb64uuid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tanbro","download_url":"https://codeload.github.com/tanbro/b64uuid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248794569,"owners_count":21162615,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["base64","pypi","python","python-3","python-library","python3","shortid","urlsafe","urlsafe-base64","uuid","uuid-string"],"created_at":"2024-09-30T19:17:48.753Z","updated_at":"2025-04-13T23:16:25.115Z","avatar_url":"https://github.com/tanbro.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# b64uuid\n\n---\n\n[![pytest](https://github.com/tanbro/b64uuid/workflows/pytest/badge.svg)](https://github.com/tanbro/b64uuid/actions?query=workflow%3Apytest)\n[![PyPI](https://img.shields.io/pypi/v/b64uuid.svg)](https://pypi.org/project/b64uuid)\n[![Documentation Status](https://readthedocs.org/projects/b64uuid/badge/?version=latest)](https://b64uuid.readthedocs.io/en/latest/?badge=latest)\n\n---\n\nA small Python library and command-line tool to encode/decode UUID to/from a 22 characters shorter URL safe base64 string.\n\nWe can use it to make UUID string a little shorter.\n\n## Installation\n\n- Installing from [PyPI](https://pypi.org/):\n\n  ```bash\n  pip install b64uuid\n  ```\n\n- Installing from a local src tree:\n\n  ```bash\n  pip install .\n  ```\n\n  or\n\n  ```bash\n  python setup.py install\n  ```\n\nCheck \u003chttps://packaging.python.org/tutorials/installing-packages\u003e for more details.\n\n## Command Line Usages\n\n- Make a random short ID\n\n  ```bash\n  $ b64uuid\n  bxntPh4PSA6-OMDfBXMLhQ\n  ```\n\n- Short ID from UUID\n\n  ```sh\n  $ b64uuid -u 2863a16d-b6ae-45a2-9d74-98d20377d56a\n  KGOhbbauRaKddJjSA3fVag\n  ```\n\n- Short ID to UUID\n\n  ```sh\n  $ b64uuid -s KGOhbbauRaKddJjSA3fVag\n  2863a16d-b6ae-45a2-9d74-98d20377d56a\n  ```\n\n## Library Usages\n\n- Make a random short ID\n\n  ```python\n  \u003e\u003e\u003e from b64uuid import B64UUID\n  \u003e\u003e\u003e\n  \u003e\u003e\u003e B64UUID().string\n  'Ft018l4aTwalxqDHMQoqTQ'\n  ```\n\n- Short ID from UUID\n\n  ```python\n  \u003e\u003e\u003e from uuid import uuid1\n  \u003e\u003e\u003e from b64uuid import B64UUID\n  \u003e\u003e\u003e\n  \u003e\u003e\u003e uid = uuid1()\n  \u003e\u003e\u003e str(uid)\n  'cb6e319c-d793-11ea-9619-1cb72cde3f7f'\n  \u003e\u003e\u003e bid = B64UUID(uid)\n  \u003e\u003e\u003e str(bid)\n  'y24xnNeTEeqWGRy3LN4_fw'\n  ```\n\n- Short ID to UUID\n\n  ```python\n  \u003e\u003e\u003e from uuid import uuid1\n  \u003e\u003e\u003e from b64uuid import B64UUID\n  \u003e\u003e\u003e\n  \u003e\u003e\u003e uid = uuid1()\n  \u003e\u003e\u003e uid.hex\n  '95327416d79411ea96191cb72cde3f7f'\n  \u003e\u003e\u003e short_id = B64UUID(uid).string\n  \u003e\u003e\u003e short_id\n  'lTJ0FteUEeqWGRy3LN4_fw'\n  \u003e\u003e\u003e B64UUID(short_id).uuid.hex\n  '95327416d79411ea96191cb72cde3f7f'\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanbro%2Fb64uuid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftanbro%2Fb64uuid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanbro%2Fb64uuid/lists"}