apipod_registry
Parse, hold and persist Services. 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: Service is the aggregate root, each ServiceDetails binding 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 minimalService, one details binding, ready to register.credential_requirements(contract): security scheme names a caller must supply, contract-wide and per endpoint. Parsers keepsecuritySchemesandsecurityon the contract so clients place credentials at send time.Registry: in-memory catalog with id/name lookups for services, models and categories. Attach aServiceStorefor persistence; a cache miss reads throughstore.load,load_all()warms the whole cache. Included stores:FileSystemStore(local JSON) andCatalogStore(read-only, over the platform catalog API; pass a socaity-cliCatalogClient). The platform backend ServiceCatalog owns service data; this package never talks to a database.
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.load_all()
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), details.deployment.provider (or a connector address) says where it runs, details.execution says who provisions it (provisioned, mediated, external, platform). A Cog model hosted on Replicate is specification="cog" and deployment.provider="replicate".
MIT-licensed.
Metadata
Release files for apipod-registry 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| apipod_registry-0.1.9.tar.gz | 59.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| apipod_registry-0.1.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 111.9 kB
Release files / apipod_registry-0.1.9.tar.gz
| Download URL | apipod_registry-0.1.9.tar.gz |
|---|---|
| Size | 59.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d0f54a81756988cccdbd69bb52655880225d9ecc6c42d56db61bbaad07172645
|
|
BLAKE2b-256 checksum How to use checksums |
ef1ae719a80c0263109fec37db4ecaf148aa4ebbadfa6f3fec4052a249c57f8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / apipod_registry-0.1.9-py3-none-any.whl
| Download URL | apipod_registry-0.1.9-py3-none-any.whl |
|---|---|
| Size | 52.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3d2ca0b57189e1c8fdf6674e0d997be211f12041c68e2ac0f5e9a648098ab2dc
|
|
BLAKE2b-256 checksum How to use checksums |
3bb0b4f5718bd07a728d42f2bfd9d4a860d9907aaea06d01a3180634b7c0526b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|