Skip to main content

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 a ServiceContract with typed endpoints, parameters, streaming flags and a specification_hash.
  • materialize_contract(spec, provider): parse_contract plus provider wire behavior. Replicate wraps every cog model in its predictions job API, so contracts of replicate deployments get has_job_queue=True here, not in the parsers.
  • parse_address(url): URLs become typed ServiceAddress objects (socaity, RunPod, Replicate, generic).
  • create_service(contract, address): the minimal AIService, one deployment, ready to register.
  • Registry: in-memory catalog with id/name lookups for services, models and categories. Attach a ServiceStore (like the included FileSystemStore) 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

apipod_registry-0.1.5.tar.gz (61.3 kB view details)

Uploaded Source

Built Distribution

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

apipod_registry-0.1.5-py3-none-any.whl (54.6 kB view details)

Uploaded Python 3

File details

Details for the file apipod_registry-0.1.5.tar.gz.

File metadata

  • Download URL: apipod_registry-0.1.5.tar.gz
  • Upload date:
  • Size: 61.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for apipod_registry-0.1.5.tar.gz
Algorithm Hash digest
SHA256 315e4bcb83f1d486e819f75257e1ef899de819ef6dc6c299f34a892682318b0f
MD5 af25085d1ff4d45c4dcb1d4be889c7ef
BLAKE2b-256 1260c9665e8e8afe5a2e30c095de3f82537475c9b7a96a4d74c19d514e92e046

See more details on using hashes here.

File details

Details for the file apipod_registry-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for apipod_registry-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 76ebb9b5d8473437d03e1e408e7cb67db083eba28c4af70aa1fb273a52c54825
MD5 559e7a83ecc716b991f305f5d170a17d
BLAKE2b-256 5a9f9d237d1e687c40fa38d6b646cf1a7e9e95980f364f0a6a652822dc196ea2

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.7

2 files

0.1.6

2 files

This release

0.1.5 This release

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

0.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page