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-service
usvc init seller my-marketplace

# 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/
โ”œโ”€โ”€ seller.json                    # One seller per repo
โ”œโ”€โ”€ ${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.22.tar.gz (163.6 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.22-py3-none-any.whl (110.3 kB view details)

Uploaded Python 3

File details

Details for the file unitysvc_services-0.1.22.tar.gz.

File metadata

  • Download URL: unitysvc_services-0.1.22.tar.gz
  • Upload date:
  • Size: 163.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for unitysvc_services-0.1.22.tar.gz
Algorithm Hash digest
SHA256 c19a8f9684462f3746a5e80d55e2791593c95662b2f7b6ba7f0fe3d3240221df
MD5 5fc876b76b29d465b7cf1edc5f23dd5b
BLAKE2b-256 1d0bbb3a47e2039be4a7d0fbd5339ab4729ee280f8a59c63e08e09cd70342cfd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for unitysvc_services-0.1.22-py3-none-any.whl
Algorithm Hash digest
SHA256 56158d4c28a690f0d9ffc6fbf7492638c3d1730868b5aa8049be41a9f4fdeb68
MD5 74a643f5cb72097b4ccbf87ff8779e8a
BLAKE2b-256 009b76f3a6c3cc888f34ee12ac184e4e9660e5338cf092b240388c19be0ee8de

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