
Security News
pnpm 10.12 Introduces Global Virtual Store and Expanded Version Catalogs
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.
A small library and tool to encode/decode a python UUID object to/from a 22 characters shorter URL safe base64 string.
A small library and tool to encode/decode a python UUID object to/from a 22 characters shorter URL safe base64 string.
We can use it to make UUID string a little shorter.
Install from PyPI:
pip install b64uuid
Install from source :
Clone or download whole project, enter the project's root directory, then
pip install -e .
or
python setup.py install
Check https://packaging.python.org/tutorials/installing-packages/ for more details.
Make a random short ID
$ b64uuid
bxntPh4PSA6-OMDfBXMLhQ
Short ID from UUID
$ b64uuid -u 2863a16d-b6ae-45a2-9d74-98d20377d56a
KGOhbbauRaKddJjSA3fVag
Short ID to UUID
$ b64uuid -s KGOhbbauRaKddJjSA3fVag
2863a16d-b6ae-45a2-9d74-98d20377d56a
Shorten UUID string
>>> from uuid import uuid1
>>> from b64uuid import B64UUID
>>>
>>> uid = uuid1()
>>> str(uid)
'cb6e319c-d793-11ea-9619-1cb72cde3f7f'
>>> bid = B64UUID(uid)
>>> str(bid)
'y24xnNeTEeqWGRy3LN4_fw'
Generate a new short ID
>>> from b64uuid import B64UUID
>>>
>>> B64UUID().string
'Ft018l4aTwalxqDHMQoqTQ'
Restore UUID from short ID
>>> from uuid import uuid1
>>> from b64uuid import B64UUID
>>>
>>> uid = uuid1()
>>> uid.hex
'95327416d79411ea96191cb72cde3f7f'
>>> short_id = B64UUID(uid).string
>>> short_id
'lTJ0FteUEeqWGRy3LN4_fw'
>>> B64UUID(short_id).uuid.hex
'95327416d79411ea96191cb72cde3f7f
(TODO: ...)
2020-08-06
Liu Xue Yan (liu_xue_yan@foxmail.com)
FAQs
A small library and tool to encode/decode a python UUID object to/from a 22 characters shorter URL safe base64 string.
We found that b64uuid demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.
Security News
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.