Skip to content

typeid cli #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,23 @@ 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
```

- 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
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down