Skip to main content

Pydantic request/response contract for the slab API — shared by the API and any client (CLI, third parties). Depends on pydantic only.

Project description

slab-schemas

The pydantic wire contract for the slab trading-card API: the request and response models (DTOs) and enums that the API serves and its clients consume.

pip install slab-schemas

Depends on pydantic only — no server, database, or ORM code — so a CLI or third-party client can import it to build typed requests and parse responses without pulling in the API.

from slab_schemas.cards import CardSearchQuery
from slab_schemas.collection import CollectionSearchQuery

query = CardSearchQuery(subject="Connor Bedard", year=2023)
# ... POST query.model_dump() to /cards/search, parse the JSON back into the typed result model

This is the single source of truth for the API's over-the-wire shape: the API produces these models and clients (e.g. slab-cli) consume them, so the two can never drift. Every entity identifier on the wire is a UUID; integer database keys are never exposed here.

Requires Python 3.13+.

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

slab_schemas-0.21.0.tar.gz (23.2 kB view details)

Uploaded Source

Built Distribution

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

slab_schemas-0.21.0-py3-none-any.whl (30.9 kB view details)

Uploaded Python 3

File details

Details for the file slab_schemas-0.21.0.tar.gz.

File metadata

  • Download URL: slab_schemas-0.21.0.tar.gz
  • Upload date:
  • Size: 23.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for slab_schemas-0.21.0.tar.gz
Algorithm Hash digest
SHA256 820bf4fc169478184e44b2d35398ccda0461b7212cb9d1dd1668ec4ec79d8772
MD5 3b3dc53dda7b9754f8e374810b5fc5cd
BLAKE2b-256 9b1e997b12700a99f032ee8022441acc0b0085ab21c07f2a12846b5cadd605e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for slab_schemas-0.21.0.tar.gz:

Publisher: schemas_pypi.yml on dev-jeb/slab

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file slab_schemas-0.21.0-py3-none-any.whl.

File metadata

  • Download URL: slab_schemas-0.21.0-py3-none-any.whl
  • Upload date:
  • Size: 30.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for slab_schemas-0.21.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6a96b0611dc63ce6255c6deae85ce76ca773c479042fb4105d9c76eceec3c868
MD5 9375b56ed38e638891e0723c787d619e
BLAKE2b-256 de8cc2013769ce6a387875469b373a7f6da90d2e3bc89012efe398cefc8bc2a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for slab_schemas-0.21.0-py3-none-any.whl:

Publisher: schemas_pypi.yml on dev-jeb/slab

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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