Skip to main content

SDK for digital service providers on UnitySVC

Project description

UnitySVC Services SDK

PyPI version Documentation Status

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

Links

License

MIT License - see LICENSE file for details.

Contributing

Contributions welcome! See Contributing Guide for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

unitysvc_services-0.1.29.tar.gz (172.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

unitysvc_services-0.1.29-py3-none-any.whl (113.3 kB view details)

Uploaded Python 3

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

Hashes for unitysvc_services-0.1.29.tar.gz
Algorithm Hash digest
SHA256 7e84836c04f90c0c3a4adbf0d3080243d00235de5361e7ab149b533419491f9b
MD5 24b93fa4529422dc31d53df2b5714b34
BLAKE2b-256 9ae552bac978b2e7ed2ff90f366976ad8410850ac5125c58eb44262a030e0011

See more details on using hashes here.

File details

Details for the file unitysvc_services-0.1.29-py3-none-any.whl.

File metadata

File hashes

Hashes for unitysvc_services-0.1.29-py3-none-any.whl
Algorithm Hash digest
SHA256 a82ee0a29651a4d26ea036942e0ed5b64f0286773bb461a3505db7d7d66d3a53
MD5 a87d1f300223b1abd9480724e151d3d9
BLAKE2b-256 a7cbd7569b1cf0ba37b8244429835b53b11ac986ad5b326736f98d1ffd3fb093

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page