SDK for digital service providers on UnitySVC
Project description
UnitySVC Services SDK
Client library and CLI tools for sellers and providers of digital service to interact with the UnitySVC platform.
๐ Full Documentation | ๐ Getting Started | ๐ CLI Reference
Overview
UnitySVC Services SDK enables digital service sellers and providers to manage their service offerings through a local-first, version-controlled workflow:
- Define service data using schema-validated files (JSON/TOML)
- Manage everything locally in git-controlled directories
- Validate data against schemas
- Test code examples using provider credentials
- Publish to UnitySVC platform when ready
- Automate with populate scripts for dynamic catalogs
Installation
pip install unitysvc-services
Requires Python 3.11+
CLI Alias: The command unitysvc_services can also be invoked using the shorter alias usvc.
Quick Example
# Initialize provider and service (using short alias 'usvc')
usvc init provider my-provider
usvc init offering my-offering
usvc init service my-listing
# Validate and format
usvc validate
usvc format
# Test code examples with upstream credentials
usvc test list --provider fireworks
usvc test run --provider fireworks --services "llama*"
# if you write a script to manage services
usvc populate
# Publish to platform (publishes all: sellers, providers, offerings, listings)
export UNITYSVC_BASE_URL="https://api.unitysvc.com/api/v1"
export UNITYSVC_API_KEY="your-api-key"
usvc publish
# Query unitysvc backend to verify data
usvc query providers --fields id,name,contact_email
Key Features
- ๐ Pydantic Models - Type-safe data models for all entities
- โ Data Validation - Comprehensive schema validation
- ๐ Local-First - Work offline, commit to git, publish when ready
- ๐ CLI Tools - Complete command-line interface
- ๐ค Automation - Script-based service generation
- ๐ Multiple Formats - Support for JSON and TOML
- ๐ฏ Smart Routing - Request routing based on routing keys (e.g., model-specific endpoints)
Workflows
Manual Workflow (small catalogs)
init โ edit files โ validate โ test โ format โ publish โ verify
Automated Workflow (large/dynamic catalogs)
init โ configure populate script โ populate โ validate โ publish
See Workflows Documentation for details.
Data Structure
data/
โโโ ${provider_name}/
โ โโโ provider.json # Provider metadata
โ โโโ docs/ # Shared documentation
โ โโโ services/
โ โโโ ${service_name}/
โ โโโ service.json # Service offering
โ โโโ listing-*.json # Service listing(s)
See Data Structure Documentation for complete details.
CLI Commands
| Command | Description |
|---|---|
init |
Initialize new data files from schemas |
list |
List local data files |
query |
Query backend API for published data |
publish |
Publish data to backend |
unpublish |
Unpublish (delete) data from backend |
update |
Update local file fields |
validate |
Validate data consistency |
format |
Format data files |
populate |
Execute provider populate scripts |
test |
Test code examples with upstream API credentials |
Run usvc --help or see CLI Reference for complete documentation.
Documentation
- Getting Started - Installation and first steps
- Data Structure - File organization rules
- Workflows - Manual and automated patterns
- Documenting Service Listings - Add documentation to services
- Creating Code Examples - Develop and test code examples
- CLI Reference - All commands and options
- File Schemas - Schema specifications
- Python API - Programmatic usage
Links
- PyPI: https://pypi.org/project/unitysvc-services/
- Documentation: https://unitysvc-services.readthedocs.io
- Source Code: https://github.com/unitysvc/unitysvc-services
- Issue Tracker: https://github.com/unitysvc/unitysvc-services/issues
License
MIT License - see LICENSE file for details.
Contributing
Contributions welcome! See Contributing Guide for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file unitysvc_services-0.1.29.tar.gz.
File metadata
- Download URL: unitysvc_services-0.1.29.tar.gz
- Upload date:
- Size: 172.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e84836c04f90c0c3a4adbf0d3080243d00235de5361e7ab149b533419491f9b
|
|
| MD5 |
24b93fa4529422dc31d53df2b5714b34
|
|
| BLAKE2b-256 |
9ae552bac978b2e7ed2ff90f366976ad8410850ac5125c58eb44262a030e0011
|
File details
Details for the file unitysvc_services-0.1.29-py3-none-any.whl.
File metadata
- Download URL: unitysvc_services-0.1.29-py3-none-any.whl
- Upload date:
- Size: 113.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a82ee0a29651a4d26ea036942e0ed5b64f0286773bb461a3505db7d7d66d3a53
|
|
| MD5 |
a87d1f300223b1abd9480724e151d3d9
|
|
| BLAKE2b-256 |
a7cbd7569b1cf0ba37b8244429835b53b11ac986ad5b326736f98d1ffd3fb093
|