unitysvc-sellers 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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025, Bo Peng
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,124 @@
1
+ Metadata-Version: 2.4
2
+ Name: unitysvc-sellers
3
+ Version: 0.1.0
4
+ Summary: Seller-facing tools for UnitySVC: local catalog organization CLI (usvc_seller)
5
+ Author-email: Bo Peng <bo.peng@unitysvc.com>
6
+ Maintainer-email: Bo Peng <bo.peng@unitysvc.com>
7
+ License-Expression: MIT
8
+ Project-URL: bugs, https://github.com/unitysvc/unitysvc-sellers/issues
9
+ Project-URL: homepage, https://github.com/unitysvc/unitysvc-sellers
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3 :: Only
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Typing :: Typed
14
+ Requires-Python: >=3.11
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Requires-Dist: unitysvc-core>=0.1.0
18
+ Requires-Dist: typer
19
+ Requires-Dist: rich
20
+ Requires-Dist: jinja2
21
+ Requires-Dist: json5
22
+ Requires-Dist: tomli-w
23
+ Provides-Extra: test
24
+ Requires-Dist: coverage; extra == "test"
25
+ Requires-Dist: pytest; extra == "test"
26
+ Requires-Dist: ruff; extra == "test"
27
+ Requires-Dist: mypy; extra == "test"
28
+ Provides-Extra: dev
29
+ Requires-Dist: coverage; extra == "dev"
30
+ Requires-Dist: pytest; extra == "dev"
31
+ Requires-Dist: ruff; extra == "dev"
32
+ Requires-Dist: ty; extra == "dev"
33
+ Requires-Dist: ipdb; extra == "dev"
34
+ Dynamic: license-file
35
+
36
+ # unitysvc-sellers
37
+
38
+ Seller-facing tools for [UnitySVC](https://unitysvc.com/). This package
39
+ currently provides the `usvc_seller` CLI for **local** seller catalog
40
+ organization — no network calls, no UnitySVC API interactions.
41
+
42
+ The catalog HTTP SDK (`unitysvc_sellers.client`, upload, publish, etc.)
43
+ is not yet implemented; see the roadmap below.
44
+
45
+ ## Install
46
+
47
+ ```bash
48
+ pip install unitysvc-sellers
49
+ ```
50
+
51
+ This pulls in [`unitysvc-core`](https://pypi.org/project/unitysvc-core/)
52
+ for the shared data models, JSON schemas, and generic file validator,
53
+ plus `typer`/`rich` for the CLI.
54
+
55
+ ## CLI: `usvc_seller`
56
+
57
+ ```
58
+ usvc_seller data validate [DATA_DIR] # schema + catalog-layout validation
59
+ usvc_seller data format [DATA_DIR] # normalize JSON/TOML/MD files
60
+ usvc_seller data populate [DATA_DIR] # run provider populate scripts
61
+ usvc_seller data show provider NAME # show a provider record
62
+ usvc_seller data show offering NAME # " offering
63
+ usvc_seller data show listing NAME # " listing
64
+ usvc_seller data show service NAME # " service-definition
65
+ usvc_seller data list providers [DATA_DIR] # list files of each kind
66
+ usvc_seller data list sellers [DATA_DIR]
67
+ usvc_seller data list offerings [DATA_DIR]
68
+ usvc_seller data list listings [DATA_DIR]
69
+ usvc_seller data list services [DATA_DIR]
70
+ usvc_seller data list-tests # list code-example / connectivity tests
71
+ usvc_seller data run-tests # run tests locally
72
+ usvc_seller data show-test SERVICE # show last test result
73
+ ```
74
+
75
+ All commands operate on the seller's local catalog directory. No
76
+ `usvc_seller data upload` yet — that arrives with the HTTP SDK.
77
+
78
+ ## Layout
79
+
80
+ ```
81
+ src/unitysvc_sellers/
82
+ ├── cli.py # entry point — registers data subcommands
83
+ ├── data.py # `usvc_seller data *` command group
84
+ ├── validator.py # seller DataValidator (subclass of unitysvc_core.validator.DataValidator)
85
+ ├── format_data.py # `usvc_seller data format`
86
+ ├── populate.py # `usvc_seller data populate`
87
+ ├── example.py # `list-tests` / `run-tests` / `show-test`
88
+ ├── list.py # `usvc_seller data list *`
89
+ ├── output.py # shared Rich output helpers
90
+ └── utils.py # seller-only helpers (resolve_provider_name,
91
+ # resolve_service_name_for_listing,
92
+ # convert_convenience_fields_to_documents,
93
+ # render_template_file, execute_script_content,
94
+ # determine_interpreter)
95
+ # Generic helpers re-exported from unitysvc_core.utils.
96
+ ```
97
+
98
+ The seller `DataValidator` adds catalog-layout checks to the core
99
+ per-file validator: provider-status warnings, the invariant that each
100
+ service directory has exactly one `offering_v1` file, and the invariant
101
+ that listings only live alongside an offering.
102
+
103
+ ## History
104
+
105
+ This package was split out of
106
+ [`unitysvc-services`](https://github.com/unitysvc/unitysvc-services)
107
+ (see [issue #99](https://github.com/unitysvc/unitysvc-services/issues/99)).
108
+ Shared types + schemas moved to
109
+ [`unitysvc-core`](https://github.com/unitysvc/unitysvc-core); seller CLI
110
+ and seller-specific catalog utilities live here.
111
+
112
+ ## Roadmap
113
+
114
+ - `unitysvc_sellers.client` / `AsyncClient` — HTTP SDK against
115
+ `/sellers/*` endpoints
116
+ - `usvc_seller data upload` — thin Typer wrapper over
117
+ `client.upload(...)`
118
+ - `unitysvc_sellers.builders` — catalog-builder helpers
119
+ (`populate_from_iterator`, `render_template_file`, etc.) for
120
+ `unitysvc-services-*` data repositories
121
+
122
+ ## License
123
+
124
+ MIT
@@ -0,0 +1,89 @@
1
+ # unitysvc-sellers
2
+
3
+ Seller-facing tools for [UnitySVC](https://unitysvc.com/). This package
4
+ currently provides the `usvc_seller` CLI for **local** seller catalog
5
+ organization — no network calls, no UnitySVC API interactions.
6
+
7
+ The catalog HTTP SDK (`unitysvc_sellers.client`, upload, publish, etc.)
8
+ is not yet implemented; see the roadmap below.
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ pip install unitysvc-sellers
14
+ ```
15
+
16
+ This pulls in [`unitysvc-core`](https://pypi.org/project/unitysvc-core/)
17
+ for the shared data models, JSON schemas, and generic file validator,
18
+ plus `typer`/`rich` for the CLI.
19
+
20
+ ## CLI: `usvc_seller`
21
+
22
+ ```
23
+ usvc_seller data validate [DATA_DIR] # schema + catalog-layout validation
24
+ usvc_seller data format [DATA_DIR] # normalize JSON/TOML/MD files
25
+ usvc_seller data populate [DATA_DIR] # run provider populate scripts
26
+ usvc_seller data show provider NAME # show a provider record
27
+ usvc_seller data show offering NAME # " offering
28
+ usvc_seller data show listing NAME # " listing
29
+ usvc_seller data show service NAME # " service-definition
30
+ usvc_seller data list providers [DATA_DIR] # list files of each kind
31
+ usvc_seller data list sellers [DATA_DIR]
32
+ usvc_seller data list offerings [DATA_DIR]
33
+ usvc_seller data list listings [DATA_DIR]
34
+ usvc_seller data list services [DATA_DIR]
35
+ usvc_seller data list-tests # list code-example / connectivity tests
36
+ usvc_seller data run-tests # run tests locally
37
+ usvc_seller data show-test SERVICE # show last test result
38
+ ```
39
+
40
+ All commands operate on the seller's local catalog directory. No
41
+ `usvc_seller data upload` yet — that arrives with the HTTP SDK.
42
+
43
+ ## Layout
44
+
45
+ ```
46
+ src/unitysvc_sellers/
47
+ ├── cli.py # entry point — registers data subcommands
48
+ ├── data.py # `usvc_seller data *` command group
49
+ ├── validator.py # seller DataValidator (subclass of unitysvc_core.validator.DataValidator)
50
+ ├── format_data.py # `usvc_seller data format`
51
+ ├── populate.py # `usvc_seller data populate`
52
+ ├── example.py # `list-tests` / `run-tests` / `show-test`
53
+ ├── list.py # `usvc_seller data list *`
54
+ ├── output.py # shared Rich output helpers
55
+ └── utils.py # seller-only helpers (resolve_provider_name,
56
+ # resolve_service_name_for_listing,
57
+ # convert_convenience_fields_to_documents,
58
+ # render_template_file, execute_script_content,
59
+ # determine_interpreter)
60
+ # Generic helpers re-exported from unitysvc_core.utils.
61
+ ```
62
+
63
+ The seller `DataValidator` adds catalog-layout checks to the core
64
+ per-file validator: provider-status warnings, the invariant that each
65
+ service directory has exactly one `offering_v1` file, and the invariant
66
+ that listings only live alongside an offering.
67
+
68
+ ## History
69
+
70
+ This package was split out of
71
+ [`unitysvc-services`](https://github.com/unitysvc/unitysvc-services)
72
+ (see [issue #99](https://github.com/unitysvc/unitysvc-services/issues/99)).
73
+ Shared types + schemas moved to
74
+ [`unitysvc-core`](https://github.com/unitysvc/unitysvc-core); seller CLI
75
+ and seller-specific catalog utilities live here.
76
+
77
+ ## Roadmap
78
+
79
+ - `unitysvc_sellers.client` / `AsyncClient` — HTTP SDK against
80
+ `/sellers/*` endpoints
81
+ - `usvc_seller data upload` — thin Typer wrapper over
82
+ `client.upload(...)`
83
+ - `unitysvc_sellers.builders` — catalog-builder helpers
84
+ (`populate_from_iterator`, `render_template_file`, etc.) for
85
+ `unitysvc-services-*` data repositories
86
+
87
+ ## License
88
+
89
+ MIT
@@ -0,0 +1,83 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "unitysvc-sellers"
7
+ version = "0.1.0"
8
+ description = "Seller-facing tools for UnitySVC: local catalog organization CLI (usvc_seller)"
9
+ readme = "README.md"
10
+ authors = [{ name = "Bo Peng", email = "bo.peng@unitysvc.com" }]
11
+ maintainers = [{ name = "Bo Peng", email = "bo.peng@unitysvc.com" }]
12
+ license = "MIT"
13
+ classifiers = [
14
+ "Programming Language :: Python :: 3",
15
+ "Programming Language :: Python :: 3 :: Only",
16
+ "Operating System :: OS Independent",
17
+ "Typing :: Typed",
18
+ ]
19
+ dependencies = [
20
+ "unitysvc-core>=0.1.0",
21
+ "typer",
22
+ "rich",
23
+ "jinja2",
24
+ "json5",
25
+ "tomli-w",
26
+ ]
27
+ requires-python = ">= 3.11"
28
+
29
+ [project.optional-dependencies]
30
+ test = [
31
+ "coverage",
32
+ "pytest",
33
+ "ruff",
34
+ "mypy",
35
+ ]
36
+ dev = [
37
+ "coverage",
38
+ "pytest",
39
+ "ruff",
40
+ "ty",
41
+ "ipdb",
42
+ ]
43
+
44
+ [project.urls]
45
+ bugs = "https://github.com/unitysvc/unitysvc-sellers/issues"
46
+ homepage = "https://github.com/unitysvc/unitysvc-sellers"
47
+
48
+ [project.scripts]
49
+ usvc_seller = "unitysvc_sellers.cli:app"
50
+
51
+ [tool.ruff]
52
+ line-length = 120
53
+
54
+ [tool.ruff.lint]
55
+ select = [
56
+ "E", # pycodestyle errors
57
+ "W", # pycodestyle warnings
58
+ "F", # Pyflakes
59
+ "I", # isort
60
+ "B", # flake8-bugbear
61
+ "UP", # pyupgrade
62
+ ]
63
+ ignore = [
64
+ "B008", # Typer pattern uses function calls in argument defaults
65
+ "B904",
66
+ ]
67
+
68
+ [tool.mypy]
69
+ ignore_missing_imports = true
70
+ warn_unused_ignores = false
71
+ disable_error_code = ["import-untyped"]
72
+
73
+ [tool.uv]
74
+ package = true
75
+
76
+ [tool.setuptools]
77
+ include-package-data = true
78
+
79
+ [tool.setuptools.package-data]
80
+ unitysvc_sellers = ["py.typed"]
81
+
82
+ [tool.pytest.ini_options]
83
+ testpaths = ["tests"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,18 @@
1
+ """UnitySVC Sellers — seller-facing tools for UnitySVC.
2
+
3
+ This package currently provides:
4
+
5
+ - ``usvc_seller`` CLI with ``usvc_seller data *`` commands for organizing
6
+ local seller catalogs (validate, format, populate, show, list, run test
7
+ scripts).
8
+
9
+ Future additions (separate modules, not yet present):
10
+
11
+ - ``unitysvc_sellers.client`` / ``AsyncClient`` — seller HTTP SDK
12
+ - ``unitysvc_sellers.builders`` — catalog-builder helpers for
13
+ ``unitysvc-services-*`` data repositories
14
+ - ``usvc_seller data upload`` — re-added when the SDK lands
15
+ """
16
+
17
+ __author__ = """Bo Peng"""
18
+ __email__ = "bo.peng@unitysvc.com"
@@ -0,0 +1,40 @@
1
+ """Console script for ``unitysvc_sellers`` — the ``usvc_seller`` CLI."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import importlib.metadata
6
+
7
+ import typer
8
+
9
+ from . import data
10
+
11
+
12
+ def version_callback(value: bool) -> None:
13
+ if value:
14
+ version = importlib.metadata.version("unitysvc-sellers")
15
+ typer.echo(f"unitysvc-sellers {version}")
16
+ raise typer.Exit()
17
+
18
+
19
+ app = typer.Typer(help="UnitySVC seller CLI — local data organization tools.")
20
+
21
+
22
+ @app.callback()
23
+ def main(
24
+ version: bool | None = typer.Option(
25
+ None,
26
+ "--version",
27
+ "-V",
28
+ help="Show version and exit.",
29
+ callback=version_callback,
30
+ is_eager=True,
31
+ ),
32
+ ) -> None:
33
+ """UnitySVC seller CLI."""
34
+
35
+
36
+ app.add_typer(data.app, name="data")
37
+
38
+
39
+ if __name__ == "__main__":
40
+ app()