unitysvc-services 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.
Files changed (59) hide show
  1. unitysvc_services-0.1.0/CONTRIBUTING.md +296 -0
  2. unitysvc_services-0.1.0/HISTORY.md +5 -0
  3. unitysvc_services-0.1.0/LICENSE +21 -0
  4. unitysvc_services-0.1.0/MANIFEST.in +10 -0
  5. unitysvc_services-0.1.0/PKG-INFO +172 -0
  6. unitysvc_services-0.1.0/README.md +131 -0
  7. unitysvc_services-0.1.0/docs/api-reference.md +507 -0
  8. unitysvc_services-0.1.0/docs/cli-reference.md +528 -0
  9. unitysvc_services-0.1.0/docs/contributing.md +67 -0
  10. unitysvc_services-0.1.0/docs/data-structure.md +202 -0
  11. unitysvc_services-0.1.0/docs/development.md +572 -0
  12. unitysvc_services-0.1.0/docs/file-schemas.md +325 -0
  13. unitysvc_services-0.1.0/docs/getting-started.md +205 -0
  14. unitysvc_services-0.1.0/docs/index.md +59 -0
  15. unitysvc_services-0.1.0/docs/installation.md +38 -0
  16. unitysvc_services-0.1.0/docs/usage.md +7 -0
  17. unitysvc_services-0.1.0/docs/workflows.md +406 -0
  18. unitysvc_services-0.1.0/pyproject.toml +83 -0
  19. unitysvc_services-0.1.0/setup.cfg +4 -0
  20. unitysvc_services-0.1.0/src/unitysvc_services/__init__.py +4 -0
  21. unitysvc_services-0.1.0/src/unitysvc_services/cli.py +21 -0
  22. unitysvc_services-0.1.0/src/unitysvc_services/format_data.py +145 -0
  23. unitysvc_services-0.1.0/src/unitysvc_services/list.py +245 -0
  24. unitysvc_services-0.1.0/src/unitysvc_services/models/__init__.py +6 -0
  25. unitysvc_services-0.1.0/src/unitysvc_services/models/base.py +352 -0
  26. unitysvc_services-0.1.0/src/unitysvc_services/models/listing_v1.py +72 -0
  27. unitysvc_services-0.1.0/src/unitysvc_services/models/provider_v1.py +53 -0
  28. unitysvc_services-0.1.0/src/unitysvc_services/models/seller_v1.py +110 -0
  29. unitysvc_services-0.1.0/src/unitysvc_services/models/service_v1.py +80 -0
  30. unitysvc_services-0.1.0/src/unitysvc_services/populate.py +186 -0
  31. unitysvc_services-0.1.0/src/unitysvc_services/publisher.py +925 -0
  32. unitysvc_services-0.1.0/src/unitysvc_services/query.py +471 -0
  33. unitysvc_services-0.1.0/src/unitysvc_services/scaffold.py +1039 -0
  34. unitysvc_services-0.1.0/src/unitysvc_services/update.py +293 -0
  35. unitysvc_services-0.1.0/src/unitysvc_services/utils.py +240 -0
  36. unitysvc_services-0.1.0/src/unitysvc_services/validator.py +515 -0
  37. unitysvc_services-0.1.0/src/unitysvc_services.egg-info/PKG-INFO +172 -0
  38. unitysvc_services-0.1.0/src/unitysvc_services.egg-info/SOURCES.txt +57 -0
  39. unitysvc_services-0.1.0/src/unitysvc_services.egg-info/dependency_links.txt +1 -0
  40. unitysvc_services-0.1.0/src/unitysvc_services.egg-info/entry_points.txt +2 -0
  41. unitysvc_services-0.1.0/src/unitysvc_services.egg-info/requires.txt +29 -0
  42. unitysvc_services-0.1.0/src/unitysvc_services.egg-info/top_level.txt +1 -0
  43. unitysvc_services-0.1.0/tests/__init__.py +1 -0
  44. unitysvc_services-0.1.0/tests/example_data/README.md +87 -0
  45. unitysvc_services-0.1.0/tests/example_data/provider1/README.md +0 -0
  46. unitysvc_services-0.1.0/tests/example_data/provider1/provider.toml +14 -0
  47. unitysvc_services-0.1.0/tests/example_data/provider1/services/service1/code-example.md +124 -0
  48. unitysvc_services-0.1.0/tests/example_data/provider1/services/service1/service.toml +90 -0
  49. unitysvc_services-0.1.0/tests/example_data/provider1/services/service1/svcreseller.toml +25 -0
  50. unitysvc_services-0.1.0/tests/example_data/provider1/terms-of-service.md +45 -0
  51. unitysvc_services-0.1.0/tests/example_data/provider2/README.md +0 -0
  52. unitysvc_services-0.1.0/tests/example_data/provider2/provider.json +16 -0
  53. unitysvc_services-0.1.0/tests/example_data/provider2/services/service2/code-example.md +124 -0
  54. unitysvc_services-0.1.0/tests/example_data/provider2/services/service2/service.json +57 -0
  55. unitysvc_services-0.1.0/tests/example_data/provider2/services/service2/svcreseller.json +35 -0
  56. unitysvc_services-0.1.0/tests/example_data/provider2/terms-of-service.md +45 -0
  57. unitysvc_services-0.1.0/tests/example_data/seller.json +11 -0
  58. unitysvc_services-0.1.0/tests/test_utils.py +102 -0
  59. unitysvc_services-0.1.0/tests/test_validator.py +197 -0
@@ -0,0 +1,296 @@
1
+ # Contributing
2
+
3
+ Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
4
+
5
+ ## Types of Contributions
6
+
7
+ ### Report Bugs
8
+
9
+ Report bugs at https://github.com/unitysvc/unitysvc-services/issues.
10
+
11
+ If you are reporting a bug, please include:
12
+
13
+ - Your operating system name and version
14
+ - Python version
15
+ - Any details about your local setup that might be helpful in troubleshooting
16
+ - Detailed steps to reproduce the bug
17
+
18
+ ### Fix Bugs
19
+
20
+ Look through the GitHub issues for bugs. Anything tagged with "bug" and "help wanted" is open to whoever wants to implement it.
21
+
22
+ ### Implement Features
23
+
24
+ Look through the GitHub issues for features. Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it.
25
+
26
+ ### Write Documentation
27
+
28
+ UnitySVC Provider SDK can always use more documentation, whether as part of the official docs, in docstrings, or even on the web in blog posts, articles, and such.
29
+
30
+ ### Submit Feedback
31
+
32
+ The best way to send feedback is to file an issue at https://github.com/unitysvc/unitysvc-services/issues.
33
+
34
+ If you are proposing a feature:
35
+
36
+ - Explain in detail how it would work
37
+ - Keep the scope as narrow as possible, to make it easier to implement
38
+ - Remember that this is a volunteer-driven project, and that contributions are welcome :)
39
+
40
+ ## Getting Started
41
+
42
+ Ready to contribute? Here's how to set up `unitysvc-services` for local development.
43
+
44
+ ### 1. Fork and Clone
45
+
46
+ Fork the repo on GitHub, then clone your fork locally:
47
+
48
+ ```bash
49
+ git clone git@github.com:your_username/unitysvc-services.git
50
+ cd unitysvc-services
51
+ ```
52
+
53
+ ### 2. Set Up Development Environment
54
+
55
+ Using uv (recommended):
56
+
57
+ ```bash
58
+ # Install uv
59
+ curl -LsSf https://astral.sh/uv/install.sh | sh
60
+
61
+ # Create virtual environment and install dependencies
62
+ uv venv
63
+ source .venv/bin/activate # On Windows: .venv\Scripts\activate
64
+ uv pip install -e ".[dev]"
65
+ ```
66
+
67
+ Using pip:
68
+
69
+ ```bash
70
+ # Create virtual environment
71
+ python -m venv .venv
72
+ source .venv/bin/activate # On Windows: .venv\Scripts\activate
73
+
74
+ # Install in editable mode with dev dependencies
75
+ pip install -e ".[dev]"
76
+ ```
77
+
78
+ ### 3. Create a Branch
79
+
80
+ ```bash
81
+ git checkout -b feature/my-feature
82
+ # or
83
+ git checkout -b fix/my-bugfix
84
+ ```
85
+
86
+ ### 4. Make Your Changes
87
+
88
+ - Write clear, documented code
89
+ - Add tests for new functionality
90
+ - Update documentation as needed
91
+
92
+ ### 5. Run Tests and Linting
93
+
94
+ ```bash
95
+ # Run tests
96
+ pytest
97
+
98
+ # Run tests with coverage
99
+ pytest --cov=unitysvc_services --cov-report=html
100
+
101
+ # Lint code
102
+ ruff check .
103
+ ruff format .
104
+
105
+ # Type checking
106
+ mypy src/
107
+ ```
108
+
109
+ ### 6. Commit and Push
110
+
111
+ Follow [Conventional Commits](https://www.conventionalcommits.org/):
112
+
113
+ ```bash
114
+ git add .
115
+ git commit -m "feat: Add new feature"
116
+ # or
117
+ git commit -m "fix: Fix bug in validation"
118
+ git push origin feature/my-feature
119
+ ```
120
+
121
+ Commit types:
122
+ - `feat:` New feature
123
+ - `fix:` Bug fix
124
+ - `docs:` Documentation changes
125
+ - `refactor:` Code refactoring
126
+ - `test:` Test changes
127
+ - `chore:` Maintenance tasks
128
+
129
+ ### 7. Submit a Pull Request
130
+
131
+ Submit a pull request through GitHub.
132
+
133
+ ## Pull Request Guidelines
134
+
135
+ Before you submit a pull request, check that it meets these guidelines:
136
+
137
+ 1. **Tests**: The pull request should include tests for new functionality
138
+ 2. **Documentation**: Update docs if adding/changing features
139
+ 3. **Code Quality**: All linting checks must pass
140
+ 4. **Python Versions**: Code should work with Python 3.11+
141
+ 5. **Type Hints**: Include type hints for all functions
142
+ 6. **Docstrings**: Use Google-style docstrings
143
+
144
+ ## Development Guidelines
145
+
146
+ ### Code Style
147
+
148
+ - Follow PEP 8
149
+ - Use type hints
150
+ - Write descriptive docstrings
151
+ - Keep functions focused and small
152
+ - Use meaningful variable names
153
+
154
+ Example:
155
+
156
+ ```python
157
+ from pathlib import Path
158
+ from typing import Optional
159
+
160
+ def find_service(
161
+ name: str,
162
+ data_dir: Path,
163
+ *,
164
+ strict: bool = False
165
+ ) -> Optional[dict[str, Any]]:
166
+ """
167
+ Find a service by name.
168
+
169
+ Args:
170
+ name: Service name to search for
171
+ data_dir: Directory to search in
172
+ strict: Whether to enforce strict matching
173
+
174
+ Returns:
175
+ Service data dictionary or None if not found
176
+
177
+ Raises:
178
+ ValueError: If name is invalid
179
+ """
180
+ # Implementation
181
+ pass
182
+ ```
183
+
184
+ ### Testing
185
+
186
+ - Write unit tests for all new functions
187
+ - Use `tmp_path` fixture for file operations
188
+ - Test both success and error cases
189
+ - Aim for high code coverage
190
+
191
+ Example:
192
+
193
+ ```python
194
+ def test_load_json_file(tmp_path: Path):
195
+ """Test loading JSON file."""
196
+ # Arrange
197
+ test_file = tmp_path / "test.json"
198
+ test_file.write_text('{"schema": "provider_v1"}')
199
+
200
+ # Act
201
+ data, fmt = load_data_file(test_file)
202
+
203
+ # Assert
204
+ assert fmt == "json"
205
+ assert data["schema"] == "provider_v1"
206
+ ```
207
+
208
+ ### Documentation
209
+
210
+ - Update relevant documentation in `docs/`
211
+ - Add examples for new features
212
+ - Keep README.md up to date
213
+ - Use clear, concise language
214
+
215
+ ## Running Tests
216
+
217
+ ```bash
218
+ # Run all tests
219
+ pytest
220
+
221
+ # Run specific test file
222
+ pytest tests/test_utils.py
223
+
224
+ # Run specific test
225
+ pytest tests/test_utils.py::test_load_json_file
226
+
227
+ # Run with verbose output
228
+ pytest -v
229
+
230
+ # Run with coverage
231
+ pytest --cov=unitysvc_services --cov-report=html
232
+ open htmlcov/index.html
233
+ ```
234
+
235
+ ## Building Documentation
236
+
237
+ ```bash
238
+ # Install MkDocs
239
+ pip install mkdocs mkdocs-material
240
+
241
+ # Serve locally
242
+ mkdocs serve
243
+
244
+ # Build static site
245
+ mkdocs build
246
+ ```
247
+
248
+ ## Release Process (Maintainers Only)
249
+
250
+ ### 1. Update Version
251
+
252
+ Update version in `pyproject.toml`:
253
+
254
+ ```toml
255
+ [project]
256
+ version = "0.2.0"
257
+ ```
258
+
259
+ ### 2. Update Changelog
260
+
261
+ Update `CHANGELOG.md` with release notes.
262
+
263
+ ### 3. Create Tag
264
+
265
+ ```bash
266
+ git tag -a v0.2.0 -m "Release 0.2.0"
267
+ git push origin v0.2.0
268
+ ```
269
+
270
+ ### 4. Build and Publish
271
+
272
+ ```bash
273
+ # Build package
274
+ python -m build
275
+
276
+ # Upload to PyPI
277
+ python -m twine upload dist/*
278
+ ```
279
+
280
+ ### 5. Deploy Documentation
281
+
282
+ ```bash
283
+ mkdocs gh-deploy
284
+ ```
285
+
286
+ ## Code of Conduct
287
+
288
+ Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
289
+
290
+ ## Questions?
291
+
292
+ - Check the [Development Guide](docs/development.md) for detailed information
293
+ - Look through existing [issues](https://github.com/unitysvc/unitysvc-services/issues)
294
+ - Open a new issue if you need help
295
+
296
+ Thank you for contributing!
@@ -0,0 +1,5 @@
1
+ # History
2
+
3
+ ## 0.1.0 (2025-10-03)
4
+
5
+ * First release on PyPI.
@@ -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,10 @@
1
+ include CONTRIBUTING.md
2
+ include HISTORY.md
3
+ include LICENSE
4
+ include README.md
5
+
6
+ recursive-include tests *
7
+ recursive-exclude * __pycache__
8
+ recursive-exclude * *.py[co]
9
+
10
+ recursive-include docs *.md Makefile *.jpg *.png *.gif
@@ -0,0 +1,172 @@
1
+ Metadata-Version: 2.4
2
+ Name: unitysvc-services
3
+ Version: 0.1.0
4
+ Summary: SDK for digital service providers on UnitySVC
5
+ Author-email: Bo Peng <bo.peng@unitysvc.com>
6
+ Maintainer-email: Bo Peng <bo.peng@unitysvc.com>
7
+ License: MIT
8
+ Project-URL: bugs, https://github.com/unitysvc/unitysvc-services/issues
9
+ Project-URL: changelog, https://github.com/unitysvc/unitysvc-services/blob/master/changelog.md
10
+ Project-URL: homepage, https://github.com/unitysvc/unitysvc-services
11
+ Requires-Python: >=3.11
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: typer
15
+ Requires-Dist: pydantic
16
+ Requires-Dist: jsonschema
17
+ Requires-Dist: jinja2
18
+ Requires-Dist: rich
19
+ Requires-Dist: httpx
20
+ Requires-Dist: tomli-w
21
+ Provides-Extra: test
22
+ Requires-Dist: coverage; extra == "test"
23
+ Requires-Dist: pytest; extra == "test"
24
+ Requires-Dist: ruff; extra == "test"
25
+ Requires-Dist: mypy; extra == "test"
26
+ Requires-Dist: ipdb; extra == "test"
27
+ Provides-Extra: dev
28
+ Requires-Dist: coverage; extra == "dev"
29
+ Requires-Dist: pytest; extra == "dev"
30
+ Requires-Dist: ruff; extra == "dev"
31
+ Requires-Dist: ty; extra == "dev"
32
+ Requires-Dist: ipdb; extra == "dev"
33
+ Requires-Dist: mkdocs; extra == "dev"
34
+ Requires-Dist: mkdocs-material; extra == "dev"
35
+ Requires-Dist: mkdocs-autorefs; extra == "dev"
36
+ Provides-Extra: docs
37
+ Requires-Dist: mkdocs; extra == "docs"
38
+ Requires-Dist: mkdocs-material; extra == "docs"
39
+ Requires-Dist: mkdocs-autorefs; extra == "docs"
40
+ Dynamic: license-file
41
+
42
+ # UnitySVC Provider SDK
43
+
44
+ ![PyPI version](https://img.shields.io/pypi/v/unitysvc-services.svg)
45
+ [![Documentation Status](https://readthedocs.org/projects/unitysvc-services/badge/?version=latest)](https://unitysvc-services.readthedocs.io/en/latest/?version=latest)
46
+
47
+ Client library and CLI tools for digital service providers to interact with the UnitySVC platform.
48
+
49
+ **📚 [Full Documentation](https://unitysvc-services.readthedocs.io)** | **🚀 [Getting Started](https://unitysvc-services.readthedocs.io/en/latest/getting-started/)** | **📖 [CLI Reference](https://unitysvc-services.readthedocs.io/en/latest/cli-reference/)**
50
+
51
+ ## Overview
52
+
53
+ UnitySVC Provider SDK enables digital service providers to manage their service offerings through a **local-first, version-controlled workflow**:
54
+
55
+ - **Define** service data using schema-validated files (JSON/TOML)
56
+ - **Manage** everything locally in git-controlled directories
57
+ - **Validate** data against schemas before publishing
58
+ - **Publish** to UnitySVC platform when ready
59
+ - **Automate** with populate scripts for dynamic catalogs
60
+
61
+ ## Installation
62
+
63
+ ```bash
64
+ pip install unitysvc-services
65
+ ```
66
+
67
+ Requires Python 3.11+
68
+
69
+ ## Quick Example
70
+
71
+ ```bash
72
+ # Initialize provider and service
73
+ unitysvc_services init provider my-provider
74
+ unitysvc_services init offering my-service
75
+ unitysvc_services init seller my-marketplace
76
+
77
+ # Validate and format
78
+ unitysvc_services validate
79
+ unitysvc_services format
80
+
81
+ # Publish to platform
82
+ export UNITYSVC_BACKEND_URL="https://api.unitysvc.com/api/v1"
83
+ export UNITYSVC_API_KEY="your-api-key"
84
+
85
+ unitysvc_services publish providers
86
+ unitysvc_services publish sellers
87
+ unitysvc_services publish offerings
88
+ unitysvc_services publish listings
89
+
90
+ # Verify
91
+ unitysvc_services query offerings
92
+ ```
93
+
94
+ ## Key Features
95
+
96
+ - 📋 **Pydantic Models** - Type-safe data models for all entities
97
+ - ✅ **Data Validation** - Comprehensive schema validation
98
+ - 🔄 **Local-First** - Work offline, commit to git, publish when ready
99
+ - 🚀 **CLI Tools** - Complete command-line interface
100
+ - 🤖 **Automation** - Script-based service generation
101
+ - 📝 **Multiple Formats** - Support for JSON and TOML
102
+
103
+ ## Workflows
104
+
105
+ ### Manual Workflow (small catalogs)
106
+
107
+ ```bash
108
+ init → edit files → validate → format → publish → verify
109
+ ```
110
+
111
+ ### Automated Workflow (large/dynamic catalogs)
112
+
113
+ ```bash
114
+ init provider → configure populate script → populate → validate → publish
115
+ ```
116
+
117
+ See [Workflows Documentation](https://unitysvc-services.readthedocs.io/en/latest/workflows/) for details.
118
+
119
+ ## Data Structure
120
+
121
+ ```
122
+ data/
123
+ ├── seller.json # One seller per repo
124
+ ├── ${provider_name}/
125
+ │ ├── provider.json # Provider metadata
126
+ │ ├── docs/ # Shared documentation
127
+ │ └── services/
128
+ │ └── ${service_name}/
129
+ │ ├── service.json # Service offering
130
+ │ └── listing-*.json # Service listing(s)
131
+ ```
132
+
133
+ See [Data Structure Documentation](https://unitysvc-services.readthedocs.io/en/latest/data-structure/) for complete details.
134
+
135
+ ## CLI Commands
136
+
137
+ | Command | Description |
138
+ |---------|-------------|
139
+ | `init` | Initialize new data files from schemas |
140
+ | `list` | List local data files |
141
+ | `query` | Query backend API for published data |
142
+ | `publish` | Publish data to backend |
143
+ | `update` | Update local file fields |
144
+ | `validate` | Validate data consistency |
145
+ | `format` | Format data files |
146
+ | `populate` | Execute provider populate scripts |
147
+
148
+ Run `unitysvc_services --help` or see [CLI Reference](https://unitysvc-services.readthedocs.io/en/latest/cli-reference/) for complete documentation.
149
+
150
+ ## Documentation
151
+
152
+ - **[Getting Started](https://unitysvc-services.readthedocs.io/en/latest/getting-started/)** - Installation and first steps
153
+ - **[Data Structure](https://unitysvc-services.readthedocs.io/en/latest/data-structure/)** - File organization rules
154
+ - **[Workflows](https://unitysvc-services.readthedocs.io/en/latest/workflows/)** - Manual and automated patterns
155
+ - **[CLI Reference](https://unitysvc-services.readthedocs.io/en/latest/cli-reference/)** - All commands and options
156
+ - **[File Schemas](https://unitysvc-services.readthedocs.io/en/latest/file-schemas/)** - Schema specifications
157
+ - **[Python API](https://unitysvc-services.readthedocs.io/en/latest/api-reference/)** - Programmatic usage
158
+
159
+ ## Links
160
+
161
+ - **PyPI**: https://pypi.org/project/unitysvc-services/
162
+ - **Documentation**: https://unitysvc-services.readthedocs.io
163
+ - **Source Code**: https://github.com/unitysvc/unitysvc-services
164
+ - **Issue Tracker**: https://github.com/unitysvc/unitysvc-services/issues
165
+
166
+ ## License
167
+
168
+ MIT License - see [LICENSE](LICENSE) file for details.
169
+
170
+ ## Contributing
171
+
172
+ Contributions welcome! See [Contributing Guide](https://unitysvc-services.readthedocs.io/en/latest/contributing/) for details.
@@ -0,0 +1,131 @@
1
+ # UnitySVC Provider SDK
2
+
3
+ ![PyPI version](https://img.shields.io/pypi/v/unitysvc-services.svg)
4
+ [![Documentation Status](https://readthedocs.org/projects/unitysvc-services/badge/?version=latest)](https://unitysvc-services.readthedocs.io/en/latest/?version=latest)
5
+
6
+ Client library and CLI tools for digital service providers to interact with the UnitySVC platform.
7
+
8
+ **📚 [Full Documentation](https://unitysvc-services.readthedocs.io)** | **🚀 [Getting Started](https://unitysvc-services.readthedocs.io/en/latest/getting-started/)** | **📖 [CLI Reference](https://unitysvc-services.readthedocs.io/en/latest/cli-reference/)**
9
+
10
+ ## Overview
11
+
12
+ UnitySVC Provider SDK enables digital service providers to manage their service offerings through a **local-first, version-controlled workflow**:
13
+
14
+ - **Define** service data using schema-validated files (JSON/TOML)
15
+ - **Manage** everything locally in git-controlled directories
16
+ - **Validate** data against schemas before publishing
17
+ - **Publish** to UnitySVC platform when ready
18
+ - **Automate** with populate scripts for dynamic catalogs
19
+
20
+ ## Installation
21
+
22
+ ```bash
23
+ pip install unitysvc-services
24
+ ```
25
+
26
+ Requires Python 3.11+
27
+
28
+ ## Quick Example
29
+
30
+ ```bash
31
+ # Initialize provider and service
32
+ unitysvc_services init provider my-provider
33
+ unitysvc_services init offering my-service
34
+ unitysvc_services init seller my-marketplace
35
+
36
+ # Validate and format
37
+ unitysvc_services validate
38
+ unitysvc_services format
39
+
40
+ # Publish to platform
41
+ export UNITYSVC_BACKEND_URL="https://api.unitysvc.com/api/v1"
42
+ export UNITYSVC_API_KEY="your-api-key"
43
+
44
+ unitysvc_services publish providers
45
+ unitysvc_services publish sellers
46
+ unitysvc_services publish offerings
47
+ unitysvc_services publish listings
48
+
49
+ # Verify
50
+ unitysvc_services query offerings
51
+ ```
52
+
53
+ ## Key Features
54
+
55
+ - 📋 **Pydantic Models** - Type-safe data models for all entities
56
+ - ✅ **Data Validation** - Comprehensive schema validation
57
+ - 🔄 **Local-First** - Work offline, commit to git, publish when ready
58
+ - 🚀 **CLI Tools** - Complete command-line interface
59
+ - 🤖 **Automation** - Script-based service generation
60
+ - 📝 **Multiple Formats** - Support for JSON and TOML
61
+
62
+ ## Workflows
63
+
64
+ ### Manual Workflow (small catalogs)
65
+
66
+ ```bash
67
+ init → edit files → validate → format → publish → verify
68
+ ```
69
+
70
+ ### Automated Workflow (large/dynamic catalogs)
71
+
72
+ ```bash
73
+ init provider → configure populate script → populate → validate → publish
74
+ ```
75
+
76
+ See [Workflows Documentation](https://unitysvc-services.readthedocs.io/en/latest/workflows/) for details.
77
+
78
+ ## Data Structure
79
+
80
+ ```
81
+ data/
82
+ ├── seller.json # One seller per repo
83
+ ├── ${provider_name}/
84
+ │ ├── provider.json # Provider metadata
85
+ │ ├── docs/ # Shared documentation
86
+ │ └── services/
87
+ │ └── ${service_name}/
88
+ │ ├── service.json # Service offering
89
+ │ └── listing-*.json # Service listing(s)
90
+ ```
91
+
92
+ See [Data Structure Documentation](https://unitysvc-services.readthedocs.io/en/latest/data-structure/) for complete details.
93
+
94
+ ## CLI Commands
95
+
96
+ | Command | Description |
97
+ |---------|-------------|
98
+ | `init` | Initialize new data files from schemas |
99
+ | `list` | List local data files |
100
+ | `query` | Query backend API for published data |
101
+ | `publish` | Publish data to backend |
102
+ | `update` | Update local file fields |
103
+ | `validate` | Validate data consistency |
104
+ | `format` | Format data files |
105
+ | `populate` | Execute provider populate scripts |
106
+
107
+ Run `unitysvc_services --help` or see [CLI Reference](https://unitysvc-services.readthedocs.io/en/latest/cli-reference/) for complete documentation.
108
+
109
+ ## Documentation
110
+
111
+ - **[Getting Started](https://unitysvc-services.readthedocs.io/en/latest/getting-started/)** - Installation and first steps
112
+ - **[Data Structure](https://unitysvc-services.readthedocs.io/en/latest/data-structure/)** - File organization rules
113
+ - **[Workflows](https://unitysvc-services.readthedocs.io/en/latest/workflows/)** - Manual and automated patterns
114
+ - **[CLI Reference](https://unitysvc-services.readthedocs.io/en/latest/cli-reference/)** - All commands and options
115
+ - **[File Schemas](https://unitysvc-services.readthedocs.io/en/latest/file-schemas/)** - Schema specifications
116
+ - **[Python API](https://unitysvc-services.readthedocs.io/en/latest/api-reference/)** - Programmatic usage
117
+
118
+ ## Links
119
+
120
+ - **PyPI**: https://pypi.org/project/unitysvc-services/
121
+ - **Documentation**: https://unitysvc-services.readthedocs.io
122
+ - **Source Code**: https://github.com/unitysvc/unitysvc-services
123
+ - **Issue Tracker**: https://github.com/unitysvc/unitysvc-services/issues
124
+
125
+ ## License
126
+
127
+ MIT License - see [LICENSE](LICENSE) file for details.
128
+
129
+ ## Contributing
130
+
131
+ Contributions welcome! See [Contributing Guide](https://unitysvc-services.readthedocs.io/en/latest/contributing/) for details.