From 1153325bd5e92a01b68d4592be6eedccd6c71c55 Mon Sep 17 00:00:00 2001 From: Michael Bianco Date: Thu, 3 Apr 2025 10:45:06 -0600 Subject: [PATCH 1/2] feat: add typeid cli --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 7a88577..826cabc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,6 +61,9 @@ pyyaml = "^6.0" [tool.poetry.extras] cli = ["click"] +[tool.poetry.scripts] +typeid = "typeid.cli:cli" + [tool.pylint] disable = ["C0111", "C0116", "C0114", "R0903"] From 1aab4b547e2284c051801ecffd6e48216734fd78 Mon Sep 17 00:00:00 2001 From: Michael Bianco Date: Thu, 3 Apr 2025 11:35:01 -0600 Subject: [PATCH 2/2] docs: typeid cli --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3358955..355faf6 100644 --- a/README.md +++ b/README.md @@ -91,14 +91,14 @@ This particular implementation provides an pip package that can be used by any P - To generate a new TypeID, run: ```console - $ python3 -m typeid.cli new -p prefix + $ typeid new -p prefix prefix_01h2xcejqtf2nbrexx3vqjhp41 ``` - To decode an existing TypeID into a UUID run: ```console - $ python3 -m typeid.cli decode prefix_01h2xcejqtf2nbrexx3vqjhp41 + $ typeid decode prefix_01h2xcejqtf2nbrexx3vqjhp41 type: prefix uuid: 0188bac7-4afa-78aa-bc3b-bd1eef28d881 ``` @@ -106,6 +106,8 @@ This particular implementation provides an pip package that can be used by any P - And to encode an existing UUID into a TypeID run: ```console - $ python3 -m typeid.cli encode 0188bac7-4afa-78aa-bc3b-bd1eef28d881 --prefix prefix + $ typeid encode 0188bac7-4afa-78aa-bc3b-bd1eef28d881 --prefix prefix prefix_01h2xcejqtf2nbrexx3vqjhp41 ``` + +You can l \ No newline at end of file