Skip to main content

satchel-adapter-sdk

The small public contract for Satchel source adapters: packages that read an upstream tool's metadata (dbt, Cube, SQLMesh, ...) and describe it in Satchel's canonical IR. The Satchel server turns that IR into ordinary context items, keeps them in sync, and never lets a sync overwrite what analysts added on top.

This distribution depends on pydantic and pyyaml only. It has no web framework, ORM or database driver; an adapter must not need them either.

from satchel_adapter_sdk import AdapterInfo, SourceAdapter, SourceFiles, SourceSnapshot

What you write

An adapter is an object with an info: AdapterInfo manifest and a pure load method:

class MyAdapter:
    info = AdapterInfo(kind="mytool", display_name="My tool", version="0.1.0",
                       maturity="experimental", capabilities=frozenset({"assets"}),
                       config_model=MyConfig, file_inputs=(FileInput(name="export", required=True),))

    def load(self, config: MyConfig, files: SourceFiles) -> SourceSnapshot: ...

adapter = MyAdapter()

Register it under the satchel.sources entry-point group in your pyproject.toml:

[project.entry-points."satchel.sources"]
mytool = "satchel_source_mytool:adapter"

pip install satchel-source-mytool is then enough; satchel source list shows it as external. Start from templates/adapter/ and read docs/adapters/writing-an-adapter.md.

Rules

  • Pure. load(config, files) is deterministic and does no database access. It does no network access either, unless you declare the network capability. The host reads the input files (named by AdapterInfo.file_inputs, a path in the config or an upload) and hands you bytes.
  • No server imports. Never import satchel.*, SQLAlchemy, a database driver or FastAPI. Built-in adapters are held to the same rule by a test.
  • Folders and optional dependencies. FileInput(multiple=True, extensions=...) lets the path be a folder (read it with SourceFiles.group(name)); AdapterInfo.requires names the optional modules an adapter imports lazily, so the host can list it as unavailable with an install hint.
  • Normalised names. Emit schema.table fqns in lower case (normalise_fqn). Put the database in SourceAsset.database.
  • Warnings, not failures. A construct you cannot map goes into SourceSnapshot.warnings; one bad node must not fail the sync.
  • Trust. Installed adapters run in the Satchel process as trusted code. Install only adapters you would run on the server.

IR versioning

satchel_adapter_sdk.IR_VERSION is a semantic version carried by every snapshot.

Change Bump
New optional field, new optional model, new capability minor
Removed or renamed field, changed meaning, new required field major

The server accepts a snapshot whose major equals its own SDK's major and refuses others with a clear message. Within a major, the server ignores nothing it does not understand and requires nothing new, so an adapter written against 1.0.0 keeps working on every 1.x.

Conformance kit

from satchel_adapter_sdk.testing import assert_conformant

def test_conformance(update_golden):
    assert_conformant(adapter, MyConfig(export="..."), files,
                      golden=Path(__file__).parent / "golden" / "snapshot.json",
                      update_golden=update_golden)

It checks the manifest, that the snapshot validates and round-trips, the IR version, determinism (two loads equal), a stable fingerprint, normalised fqns and unique keys, valid MDL, declared capabilities, no network (unless declared) and no server imports, and compares the snapshot to a committed golden file. Add pytest_plugins = ["satchel_adapter_sdk.pytest_plugin"] to your conftest.py for the --update-golden flag (or set SATCHEL_UPDATE_GOLDEN=1).

Wren MDL

If your tool has governed metrics, build a Wren MDL manifest with MdlBuilder (models over warehouse tables plus cubes of measures and dimensions) and return it in a SourceSemanticModel. Satchel serves it through query_metrics.

Develop

cd sdk && uv sync && uv run pytest -q && uv run ruff check . && uv run mypy satchel_adapter_sdk

Licence: Apache-2.0.

Metadata

Release files for satchel-adapter-sdk 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for satchel-adapter-sdk 1.2.1
File Size Uploaded Provenance Actions
satchel_adapter_sdk-1.2.1.tar.gz 57.3 kB With provenance Details for satchel_adapter_sdk-1.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for satchel-adapter-sdk 1.2.1
File Interpreter ABI Platform Actions
satchel_adapter_sdk-1.2.1-py3-none-any.whl Python 3 none any Details for satchel_adapter_sdk-1.2.1-py3-none-any.whl

Total release size: 76.8 kB

Release files / satchel_adapter_sdk-1.2.1.tar.gz

Download URL satchel_adapter_sdk-1.2.1.tar.gz
Size 57.3 kB
Tags Source
SHA-256 checksum
How to use checksums
aafb89e343aae6148aacd3e668df7a18c9e736cba1e60f47b41050a3d9c05f91
BLAKE2b-256 checksum
How to use checksums
bfffd28e70febe8c2a2b859fc0f86bcc5fad5842d7b577fa2bb2e892d0a4a3b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / satchel_adapter_sdk-1.2.1-py3-none-any.whl

Download URL satchel_adapter_sdk-1.2.1-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4b43a0b59c6da65e93ea0ca72ffeab6e822163111d27ab25a0d735ad6772e704
BLAKE2b-256 checksum
How to use checksums
4f27c3d88795d6facd9be97888b852fdc8e5aefb1104063f0e8ce8a68bf3353b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Security for satchel-adapter-sdk 1.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for satchel_adapter_sdk-1.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.2.1 This release

2 release files Full provenance

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