3 ms·
I needed this a few (9, wow) years back and wrote this Python library: https://pypi.org/project/shortuuid/ https://pypi.org/project/shortuuid/
by StavrosK 6y ago
I needed this a few (9, wow) years back and wrote this Python library:
https://pypi.org/project/shortuuid/ https://pypi.org/project/shortuuid/
- abathur 6y agoglad you did! <3 me some shortuuid :)
- StavrosK 6y ago<3
- ivan_ah 6y agoI came here to post about this! Thx a lot for this. It works great. Today I'm working on a custom `ShortUUIDField` (a subclass of Django's UUIDField) so I can stick to standard building blocks internally, but show sortuuids to users.
- StavrosK 6y agoI've been thinking of adding that to ShortUUID, do you mind showing me when you're done (or issuing a PR)?
- ivan_ah 6y ago@StavrosK the code still very much WIP, but you can take a look at the links I posted on this issue: https://github.com/skorokithakis/shortuuid/issues/50 https://github.com/skorokithakis/shortuuid/issues/50 I'm making some choices very specific to my use case (truncated to length 7, and use of a prefix), so not directly PR-able, but can followup in January if you find this useful. (Going to have to figure out how to test with all Djangos and DB backends to be sure it works)