apipod_registry
Parse, hold and persist AIServices. This package is the one-stop tool for managing AI service information: it turns raw specs into typed contracts and keeps services, models and categories in one registry.
Built on socaity-schemas: AIService is the aggregate root, each Deployment carries a ServiceContract (the machine-readable interface parsed from OpenAPI or Cog).
What it does
parse_contract(spec): OpenAPI, APIPod and Cog specs become aServiceContractwith typed endpoints, parameters, streaming flags and aspecification_hash.materialize_contract(spec, provider):parse_contractplus provider wire behavior. Replicate wraps every cog model in its predictions job API, so contracts of replicate deployments gethas_job_queue=Truehere, not in the parsers.parse_address(url): URLs become typedServiceAddressobjects (socaity, RunPod, Replicate, generic).create_service(contract, address): the minimalAIService, one deployment, ready to register.Registry: in-memory catalog with id/name lookups for services, models and categories. Attach aServiceStore(like the includedFileSystemStore) for persistence; implement the interface to back it with anything else.
Usage
from apipod_registry import parse_contract, create_service, Registry, FileSystemStore
contract = parse_contract(openapi_dict)
service = create_service(contract, address="https://api.socaity.ai/services/v1/abc123")
registry = Registry(service_store=FileSystemStore())
registry.add_service(service)
registry.get_service("abc123") # by id
registry.get_service("face2face") # by name
registry.get_endpoint("face2face", "/swap")
Two axes that stay separate by design: contract.specification says how the spec is written (openapi, apipod, cog, cog2), deployment.provider says where it runs (socaity, runpod, replicate, ...). A Cog model hosted on Replicate is specification="cog" and provider="replicate".
MIT-licensed.
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 apipod_registry-0.1.7.tar.gz.
File metadata
- Download URL: apipod_registry-0.1.7.tar.gz
- Upload date:
- Size: 61.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
200208c2cd9a81f061296ff70b87fe2b6916fa4c383b1291c2fc479b903a04a3
|
|
| MD5 |
491f391b876ef5e0f0ca9de770a557fe
|
|
| BLAKE2b-256 |
86f696351cf37618fe6494146a9b51083c680817ebecc74899a636a234e9f3e3
|
File details
Details for the file apipod_registry-0.1.7-py3-none-any.whl.
File metadata
- Download URL: apipod_registry-0.1.7-py3-none-any.whl
- Upload date:
- Size: 54.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ccab8c7702c32db5ff2f9dcbdc4ef4c7d20cdfa4ef3bdb1d0d334af88116620
|
|
| MD5 |
f44f0a1025f3c85f924acdcfa0977628
|
|
| BLAKE2b-256 |
b41ca9c933d5439cbee7bd7e24ad6f4a614a7f1864a56db0a5e6820ccac46d96
|