Skip to main content

Shared Pydantic schemas for APIPod services and clients: requests, responses, streaming chunks and provider transport envelopes.

Project description

socaity-schemas

Shared Pydantic models for APIPod services and their clients. One definition, used on both sides of the wire, so a service and a client never drift apart on field names or shapes.

Three groups:

  • media_files: FileModel and its typed variants (ImageFileModel, AudioFileModel, VideoFileModel, ThreeDFileModel). The wire shape of a media-toolkit file: name, content type, and content as base64 or URL.
  • schemas: OpenAI-compatible request and response models (chat, completion, embedding, image, video, audio, vision, 3D) plus streaming chunks (ChatCompletionChunk).
  • transport: provider job envelopes (SocaityJobResponse, RunpodJobResponse, ReplicateJobResponse), their link/metric sub-models, and the StreamingResponse sentinel.
  • service_definitions: registry models (ServiceDefinition, EndpointDefinition, ServiceAddress variants, parameter metadata) shared by APIPodRegistry and fastSDK.
from socaity_schemas import ChatCompletionRequest, ServiceDefinition, SocaityJobResponse
from socaity_schemas.service_definitions import RunpodServiceAddress

The schema shape mirrors the OpenAI API so OpenAI-compatible clients work without translation. That is about the wire format only: any provider (Flux, Whisper, ElevenLabs, in-house models) that matches the shape is a valid backend.

Install

pip install socaity-schemas

MIT-licensed.

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

socaity_schemas-0.0.1.tar.gz (24.9 kB view details)

Uploaded Source

Built Distribution

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

socaity_schemas-0.0.1-py3-none-any.whl (26.0 kB view details)

Uploaded Python 3

File details

Details for the file socaity_schemas-0.0.1.tar.gz.

File metadata

  • Download URL: socaity_schemas-0.0.1.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for socaity_schemas-0.0.1.tar.gz
Algorithm Hash digest
SHA256 fee5fe1533aa289645a7f53a3e72118d2e1c6afd4b6121aa38c042723bdf56c7
MD5 3de75e362ac587893bff575993a20962
BLAKE2b-256 307e829ccdba5b03ae9a6a74ddb01adb2387dd854fb49b37db3e6b010f327063

See more details on using hashes here.

File details

Details for the file socaity_schemas-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for socaity_schemas-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 071c169ba448061ca17200f041444994bcfb2c9985cb2d1c63c75cf925898ed5
MD5 663a590e4db34721378872d7873713e4
BLAKE2b-256 82eb50074c1b43bb0c9f688b09b74698259d4b66c51e72979c66744b45b31887

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