typeid-python
Advanced tools
+3
-3
| Metadata-Version: 2.1 | ||
| Name: typeid-python | ||
| Version: 0.3.1 | ||
| Version: 0.3.2 | ||
| Summary: Python implementation of TypeIDs: type-safe, K-sortable, and globally unique identifiers inspired by Stripe IDs | ||
@@ -10,3 +10,3 @@ Home-page: https://github.com/akhundMurad/typeid-python | ||
| Author-email: akhundov1murad@gmail.com | ||
| Requires-Python: >=3.8,<4 | ||
| Requires-Python: >=3.9,<4 | ||
| Classifier: Development Status :: 3 - Alpha | ||
@@ -16,3 +16,2 @@ Classifier: License :: OSI Approved :: MIT License | ||
| Classifier: Programming Language :: Python :: 3 | ||
| Classifier: Programming Language :: Python :: 3.8 | ||
| Classifier: Programming Language :: Python :: 3.9 | ||
@@ -22,2 +21,3 @@ Classifier: Programming Language :: Python :: 3.10 | ||
| Classifier: Programming Language :: Python :: 3.12 | ||
| Classifier: Programming Language :: Python :: 3.13 | ||
| Provides-Extra: cli | ||
@@ -24,0 +24,0 @@ Requires-Dist: uuid6 (>=2023.5.2) |
+3
-3
| [tool.poetry] | ||
| name = "typeid-python" | ||
| version = "0.3.1" | ||
| version = "0.3.2" | ||
| description = "Python implementation of TypeIDs: type-safe, K-sortable, and globally unique identifiers inspired by Stripe IDs" | ||
@@ -12,3 +12,2 @@ authors = ["Murad Akhundov <akhundov1murad@gmail.com>"] | ||
| "License :: OSI Approved :: MIT License", | ||
| "Programming Language :: Python :: 3.8", | ||
| "Programming Language :: Python :: 3.9", | ||
@@ -18,2 +17,3 @@ "Programming Language :: Python :: 3.10", | ||
| "Programming Language :: Python :: 3.12", | ||
| "Programming Language :: Python :: 3.13", | ||
| "Operating System :: OS Independent", | ||
@@ -49,3 +49,3 @@ ] | ||
| [tool.poetry.dependencies] | ||
| python = ">=3.8,<4" | ||
| python = ">=3.9,<4" | ||
| uuid6 = ">=2023.5.2" | ||
@@ -52,0 +52,0 @@ |
+3
-3
@@ -5,11 +5,11 @@ class TypeIDException(Exception): | ||
| class PrefixValidationException(Exception): | ||
| class PrefixValidationException(TypeIDException): | ||
| ... | ||
| class SuffixValidationException(Exception): | ||
| class SuffixValidationException(TypeIDException): | ||
| ... | ||
| class InvalidTypeIDStringException(Exception): | ||
| class InvalidTypeIDStringException(TypeIDException): | ||
| ... |
+9
-5
@@ -84,9 +84,13 @@ import warnings | ||
| parts = string.rsplit("_", 1) | ||
| # When there's no underscore in the string. | ||
| if len(parts) == 1: | ||
| prefix = None | ||
| suffix = parts[0] | ||
| elif len(parts) == 2 and parts[0] == "": | ||
| if parts[0].strip() == "": | ||
| raise InvalidTypeIDStringException(f"Invalid TypeID: {string}") | ||
| return None, parts[0] | ||
| # When there is an underscore, unpack prefix and suffix. | ||
| prefix, suffix = parts | ||
| if prefix.strip() == "" or suffix.strip() == "": | ||
| raise InvalidTypeIDStringException(f"Invalid TypeID: {string}") | ||
| else: | ||
| prefix, suffix = parts | ||
@@ -93,0 +97,0 @@ return prefix, suffix |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
21748
1.01%12
9.09%484
0.41%