typeid-python icon indicating copy to clipboard operation
typeid-python copied to clipboard

Python implementation of TypeIDs: type-safe, K-sortable, and globally unique identifiers inspired by Stripe IDs

Results 8 typeid-python issues
Sort by recently updated
recently updated
newest added

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...

bug

- **feat: add typeid cli** - **docs: typeid cli**

enhancement

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':...

enhancement
good first issue

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...

enhancement

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...