Skip to main content

satva

Satva is a data pipeline engine. This package runs the same YAML pipelines as the satva command-line tool.

Requires Python 3.9 or newer. Licensed under the MIT License.

Install

pip install satva

Usage

import satva

summary = satva.run("pipeline.yaml")
print(summary["processed"], summary["succeeded"], summary["skipped"], summary["failed"])

# Raises RuntimeError on the first record failure.
satva.run("pipeline.yaml", stop_on_error=True)

satva.run returns a dict with processed, succeeded, skipped, failed, and logs. logs is a list of strings. stop_on_error defaults to False: failed records are counted and the call returns. File paths inside the YAML config are relative to the process working directory.

Django

Pass a model FileField value as source. Satva opens that file object and reads its bytes. The file name must be a data file, and the extension must match source.type in the YAML. source.path in the YAML is not used for this call.

summary = satva.run("pipelines/employees.yaml", source=row.spreadsheet)
source:
  type: csv
  path: upload.csv

sink:
  type: json
  path: media/cleaned/employees.jsonl

stages:
  - type: filter
    expression: 'active == true && salary >= 70000'
YAML source.type Accepted file name
csv .csv
tsv .tsv, .tab
json .jsonl, .ndjson, .json
json_array .json
parquet .parquet
excel .xlsx, .xls, .ods

A non-data name such as photo.png raises RuntimeError. An uploaded django.core.files.File is accepted the same way, using its .name. Full steps are in the Django guide.

External values

An external stage compares each row with values from outside the file. Point path at another data file, or pass the values to satva.run under the stage name. The YAML on_match, on_differ, and on_missing settings choose continue, skip, fail, or replace. The same comparison runs for a file, a list, or a lookup.

stages:
  - type: external
    name: catalog
    key: sku
    compare: [name, price]
    on_match: skip
    on_differ: replace
summary = satva.run(
    "pipelines/products.yaml",
    externals={
        "catalog": [
            {"sku": "A1", "name": "Widget", "price": "10"},
        ]
    },
)

A callable can supply one key at a time. It receives the key fields and returns the values to compare, or None when that key has no external value.

def catalog(key):
    current = lookup(key["sku"])
    if current is None:
        return None
    return {"name": current.name, "price": str(current.price)}

summary = satva.run("pipelines/products.yaml", externals={"catalog": catalog})

Field values are None, bool, int, float, or str. A named stage with no values raises RuntimeError before any row is read. A stage with path reads that file and does not use externals.

source:
  type: json
  path: input.jsonl

sink:
  type: json
  path: output.jsonl

stages:
  - type: filter
    expression: 'active == true && salary >= 70000'
  - type: set_field
    field: bonus
    expression: 'salary * 0.15'

Sources and sinks: CSV, TSV, JSONL (json), JSON array (json_array), Parquet, and Excel. Pipeline and expression details are in the repository docs.

Metadata

Release files for satva 0.1.2

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

Source distribution (sdist)

Source distribution for satva 0.1.2
File Size Uploaded
satva-0.1.2.tar.gz 106.5 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for satva 0.1.2
File
satva-0.1.2-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl PyPy 3.11 PyPy 3.11 7.3 Linux glibc 2.17+ x86-64 Details
satva-0.1.2-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64 Details
satva-0.1.2-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
satva-0.1.2-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.17+ x86-64 Details
satva-0.1.2-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
satva-0.1.2-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
satva-0.1.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details
satva-0.1.2-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
satva-0.1.2-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
satva-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
satva-0.1.2-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
satva-0.1.2-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
satva-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
satva-0.1.2-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
satva-0.1.2-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
satva-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
satva-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details

Total release size: 529.5 MB

Release files / satva-0.1.2.tar.gz

Download URL satva-0.1.2.tar.gz
Size 106.5 kB
Tags Source
SHA-256 checksum
How to use checksums
799bf1cae12a56eaca1b59c9b0f88dbb84944c9438e267d8cfb294a5361069b3
BLAKE2b-256 checksum
How to use checksums
4a45db026394270ce1d42432720cc57bd0b68caa7b19d03f3b717f656a6fce89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / satva-0.1.2-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL satva-0.1.2-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 59.6 MB
Tags Linux glibc 2.17+ x86-64 PyPy 3.11 PyPy 3.11 7.3
SHA-256 checksum
How to use checksums
84c04597f3daade9acad840910180390497ce255646bb8b2e1cf22ecbbf3522e
BLAKE2b-256 checksum
How to use checksums
a43a5868db541eb5ec6eb32afd8763b3fc698ce145f95e06eb8c8a5cf8dec9da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / satva-0.1.2-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL satva-0.1.2-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 59.6 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
9f58340bc901f216249cf2d9de82ad5b5c2c2ca6112b9a16c1d43f3f5dcc2632
BLAKE2b-256 checksum
How to use checksums
95d0dc77dd5ce3c3166e85d1609459c6b872845ab30e2802ef3db021b40ef1cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / satva-0.1.2-cp314-cp314-win_amd64.whl

Download URL satva-0.1.2-cp314-cp314-win_amd64.whl
Size 5.7 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
9f312d9019c9378c32a2d54504ac7b90bf138f9b9a25df3b6ba84073be14cd5e
BLAKE2b-256 checksum
How to use checksums
78c1e30227eb498ff72752b9f0ce780530d0310d0ff71c44ce48366cfb692119
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / satva-0.1.2-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL satva-0.1.2-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 59.6 MB
Tags CPython 3.14 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
7807f61df4a3e91324e4f83e21be4eccf5956ee1e2592efd9ce32991fe009309
BLAKE2b-256 checksum
How to use checksums
c912949b56520cae22e79448b34935829efed4eddb0e77da382b49cce1452f91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / satva-0.1.2-cp314-cp314-macosx_11_0_arm64.whl

Download URL satva-0.1.2-cp314-cp314-macosx_11_0_arm64.whl
Size 6.0 MB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
15f34109749e497ed61fd65c9bf3a2f50c4498ce9ba77d195454cfc4465af57f
BLAKE2b-256 checksum
How to use checksums
8375dcf108722086b4a5f99d1eea53aef1f0cc689614b3ee7db0b04f1fbabe9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / satva-0.1.2-cp313-cp313-win_amd64.whl

Download URL satva-0.1.2-cp313-cp313-win_amd64.whl
Size 5.7 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
e620d61ec00566bdc9f12180d5c192d39457712bdd9902ed4fadbe3c05e792d3
BLAKE2b-256 checksum
How to use checksums
0e3a86ac93c6fd9556436aa3b89a51f77868e5bf1de7482d05211346f2d85318
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / satva-0.1.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL satva-0.1.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 59.6 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
31d6566e8e6e55843e14ed506c7e66f9558a01320c9a5ab4957594f03e95997b
BLAKE2b-256 checksum
How to use checksums
e4d95b71471a9ef8c60ca9f416e6e6916bf38f04b359b97cc0c5376632f41908
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / satva-0.1.2-cp313-cp313-macosx_11_0_arm64.whl

Download URL satva-0.1.2-cp313-cp313-macosx_11_0_arm64.whl
Size 6.0 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1d3f7fd068c0904e07e9c39e6ab2deb7ca66fe05919a8537f56a046753e8e583
BLAKE2b-256 checksum
How to use checksums
59adb69e83cf8fc06aaf515137bc47889ba1f1b78d34b88704703b3ec927c9fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / satva-0.1.2-cp312-cp312-win_amd64.whl

Download URL satva-0.1.2-cp312-cp312-win_amd64.whl
Size 5.7 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
64b2a88368e4f96f41b1f9f78add267f98aa3d26af15f3ddd5bd2aee5be9c4b1
BLAKE2b-256 checksum
How to use checksums
df1b43f5198e791df923816d558712b40fac1e67fc8c622ce7175760d938c325
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / satva-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL satva-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 59.6 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
8d3d71b64ac434755ae0a3a171e6f5a8e2cb4c1a6fcca960dd6bb0440a6bfd0d
BLAKE2b-256 checksum
How to use checksums
43c3caa5833a1ed7ea9f71d91cce78348824261931ace0ea42382271dfc5e8b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / satva-0.1.2-cp312-cp312-macosx_11_0_arm64.whl

Download URL satva-0.1.2-cp312-cp312-macosx_11_0_arm64.whl
Size 6.0 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ada7781591c8400a140e3c25baa6623117c83dd25a9c8913cf01a051e4e58a75
BLAKE2b-256 checksum
How to use checksums
05c333f23bc106d373d74015cbe875b9ad3b7b00be627f6bef0a0f069519542a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / satva-0.1.2-cp311-cp311-win_amd64.whl

Download URL satva-0.1.2-cp311-cp311-win_amd64.whl
Size 5.7 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
256bbc0ac26e6a721e3a27b87f372c9c9e3049f749facd14fed62c4780770e7b
BLAKE2b-256 checksum
How to use checksums
e6577993b99ae362d180bac3432bb0837fbae2bb68366658c728f52839d0f7e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / satva-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL satva-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 59.6 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
b616da6a61f153202214797ea89cf192f6a19c24b89bd5d0fc8747ce530659d5
BLAKE2b-256 checksum
How to use checksums
f2902b9e6fd90325f8cdd088943a06d3700ee0b04d834a0a3af334970eaf847a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / satva-0.1.2-cp311-cp311-macosx_11_0_arm64.whl

Download URL satva-0.1.2-cp311-cp311-macosx_11_0_arm64.whl
Size 6.0 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
41d17f1e26a52bc2d340082c481535272f1d4ee4e65ec4fae053100d3ec7b30d
BLAKE2b-256 checksum
How to use checksums
d6545bdbf91d5275445d3a33e0af40f198613990373d8c94a745c25ac8cd3f75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / satva-0.1.2-cp310-cp310-win_amd64.whl

Download URL satva-0.1.2-cp310-cp310-win_amd64.whl
Size 5.7 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
1e4060eb4d36054555c1437006053c8a63d66cffe9c1a6d514a2011ea330c9a3
BLAKE2b-256 checksum
How to use checksums
ae2d915077cfbba57598e1018d254ea1023b90d467a5a51ea692de11000336c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / satva-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL satva-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 59.6 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
f7f60743b9aa34e0dd04dd61e02dd7c87ccf5d1443b8896234858ad533ef7403
BLAKE2b-256 checksum
How to use checksums
a56d240deb86e94f1431ab8ec12d1a226563ce65f9055fe7114b60de438f16c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / satva-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL satva-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 59.6 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
11e58fb0b673de2982fb0c5cd766a0ad1567e6546c7f4b8748608b427bb857b5
BLAKE2b-256 checksum
How to use checksums
1f67046c894a1450400a9b3a5f1290ce14f3ecaf6821d82853dfbc3fb9b26ecb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.1.2 This release

18 release files

0.1.0

2 release 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