Skip to main content

Shared Pydantic schemas for the Storywrangler platform

Project description

storywrangler-schemas

Shared Pydantic schemas for the Storywrangler platform. Both the backend API and the storywrangler SDK import from this package — neither owns a copy of the models.

Implements the Storywrangler Specification v0.0.3.

Installation

pip install storywrangler-schemas

Most users should install storywrangler instead, which includes this package as a dependency.

What's inside

Registry models (storywrangler_schemas.registry)

Model Purpose
DatasetCreate Full registration payload (domain, format, transform, entity mapping, lineage, ...)
EndpointSchemaConfig Output shape declaration (types-counts, time-series)
TransformConfig Query slice axes (time dimension, filter dimensions, hash bucket)
EntityMappingConfig Entity ID resolution config (local column + namespace)
EntityRow One row in the entity mapping table
ManifestConfig Coverage index (availability, partition index)
OwnershipConfig Owner group, contact, lifecycle status
LineageConfig Sources, upstream datasets, pipeline repo, archival DOI

Hash bucket assignment (storywrangler_schemas.hashing)

Canonical murmur3_32 hash function shared between the backend query layer and data pipelines:

from storywrangler_schemas.hashing import assign_bucket

bucket = assign_bucket("hello", num_buckets=16)  # deterministic int in [0, 16)

Standards (storywrangler_schemas.standards)

Entity ID validation, namespace registry, and spec URL helpers.

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

storywrangler_schemas-0.2.0.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

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

storywrangler_schemas-0.2.0-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file storywrangler_schemas-0.2.0.tar.gz.

File metadata

File hashes

Hashes for storywrangler_schemas-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d56191779f3fe59418a5083ad1244c067a23dfb1763f61b2da47443c7117d50e
MD5 40648285f308a5b67e870722f92fe066
BLAKE2b-256 a787b88b259e0b1c3cf84792e6e7c3a8625485a1e20a842f47e0ce2e715e5c9c

See more details on using hashes here.

File details

Details for the file storywrangler_schemas-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for storywrangler_schemas-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 69513c4416e5cca8cae629a5e7c1b11188533b0ad39a79dbf5d9bcd3b18c7a07
MD5 96ec08ddab7f0667cf6aa3ca3fc5ea72
BLAKE2b-256 3096ea7f4cf898c3655a796a9248e335a67c66416a9100da63929696f6a0f0fd

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