utkit 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- utkit-0.1.0/PKG-INFO +10 -0
- utkit-0.1.0/README.md +0 -0
- utkit-0.1.0/pyproject.toml +19 -0
- utkit-0.1.0/src/utkit/__init__.py +2 -0
- utkit-0.1.0/src/utkit/cli/__init__.py +33 -0
utkit-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: utkit
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: core libraries for development
|
|
5
|
+
Author: TINS PJ
|
|
6
|
+
Author-email: TINS PJ <tinspj1997@gmail.com>
|
|
7
|
+
Requires-Dist: typer>=0.20.0
|
|
8
|
+
Requires-Python: >=3.12
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
|
utkit-0.1.0/README.md
ADDED
|
File without changes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "utkit"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "core libraries for development"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
authors = [
|
|
7
|
+
{ name = "TINS PJ", email = "tinspj1997@gmail.com" }
|
|
8
|
+
]
|
|
9
|
+
requires-python = ">=3.12"
|
|
10
|
+
dependencies = [
|
|
11
|
+
"typer>=0.20.0",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
[project.scripts]
|
|
15
|
+
utkit = "utkit.cli:main"
|
|
16
|
+
|
|
17
|
+
[build-system]
|
|
18
|
+
requires = ["uv_build >= 0.11.8, <0.12.0"]
|
|
19
|
+
build-backend = "uv_build"
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import typer
|
|
2
|
+
from importlib.metadata import version as get_version
|
|
3
|
+
|
|
4
|
+
app = typer.Typer(no_args_is_help=True, help="utkit - core libraries for development.")
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def _version_callback(value: bool) -> None:
|
|
8
|
+
if value:
|
|
9
|
+
typer.echo(f"utkit v{get_version('utkit')}")
|
|
10
|
+
raise typer.Exit()
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@app.callback()
|
|
14
|
+
def callback(
|
|
15
|
+
version: bool = typer.Option(
|
|
16
|
+
None,
|
|
17
|
+
"--version",
|
|
18
|
+
callback=_version_callback,
|
|
19
|
+
is_eager=True,
|
|
20
|
+
help="Show version and exit.",
|
|
21
|
+
),
|
|
22
|
+
) -> None:
|
|
23
|
+
pass
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@app.command()
|
|
27
|
+
def version() -> None:
|
|
28
|
+
"""Show the current version of utkit."""
|
|
29
|
+
typer.echo(f"utkit v{get_version('utkit')}")
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def main() -> None:
|
|
33
|
+
app()
|