typeid-python
typeid-python copied to clipboard
Python implementation of TypeIDs: type-safe, K-sortable, and globally unique identifiers inspired by Stripe IDs
Refactored the logic in `get_prefix_and_suffix` function to improve type prefix and suffix extraction. Now using `rsplit` method to accurately extract the prefix and suffix from the input string. Closes #12
I am trying to use TypeIDs as API keys and want to include both the key name and the owner name in the prefix, e.g. `keyname_owner_01hxsjs5zqfv39nsdbw9m9qdcp`. While it is possible...
According to the spec, the typeid `00000000000000000000000000` should become an all-zero uuid: >Implementations SHOULD allow encoding/decoding of other UUID variants when the bits are provided by end users. This makes...
With the recent release 0.3.2 we ran into mypy errors when passing a uuid.UUID to TypeID.from_uuid: ``` error: Argument "suffix" to "from_uuid" has incompatible type "uuid.UUID"; expected "uuid6.UUID" [arg-type] ```...
If you get an error like this: ``` 07:57:08 py_dev.1 | [SQL: INSERT INTO visit_audio_file (id, user_id, azure_file_name) VALUES (%(id)s::UUID, %(user_id)s::UUID, %(azure_file_name)s::VARCHAR) RETURNING visit_audio_file.created_at, visit_audio_file.updated_at] 07:57:08 py_dev.1 | [parameters: {'id':...
What do you think about adding a type ID binary so users don't need to use the module syntax? ``` py -m typeid.cli ``` Happy to contribute as if you're...
Fixes #18 Previously, TypeID.__repr__() returned TypeID('prefix_suffix') which was not valid Python code since the constructor doesn't accept strings directly. This made it impossible to copy-paste TypeID representations from error messages...