Skip to main content

Bauta

Put a mask on production: a safe, realistic stand-in for your production data, in whichever database you need it. Bauta masks what it copies, copies only the slice you need with every relationship intact, generates what may not be copied at all, and moves data between databases on a schedule you already run, with nothing to host.

  • Masking: consistent across tables and runs, one-to-one for keys (NIST FF1 where policy requires it), applied before anything reaches the target, and every column must be covered.
  • Discovery, subsets and synthetic data: propose a masking policy from a live schema, copy a referentially complete slice of production, create the copy's tables in whichever database it goes to, and fill tables that can't be copied with generated rows.
  • Audit: report what every job does with data and what a reviewer should question, and seal each run's masking manifest so it can be verified later.
  • Provable coverage: list every table in production and what the jobs do with each, so a table nobody wrote a job for fails the build rather than going unnoticed. A database can require that nothing reaches it unmasked.
  • Seven databases: Oracle, SQL Server, PostgreSQL, MySQL, MariaDB, SQLite and DuckDB, as source or target in any combination.
  • Files as a source: Parquet, CSV or JSON Lines in a directory or a bucket, read with SQL through the same pipeline, so a lake's files are masked and copied as a database's tables are.
  • Files as a target: a masked copy in Parquet, CSV or JSON Lines, in a directory or in S3, Google Cloud Storage or Azure, for a data lake that Athena, Snowflake or Databricks reads: appended to incrementally or published whole as a snapshot, with nothing visible until a run succeeds.
  • Iceberg tables: a masked copy as Iceberg tables in any of the three clouds, through a Glue, REST or SQL catalog: each run one commit, upserts that merge by key, and old snapshots' files deleted with them.
  • Streaming: memory stays flat however large the table, and PostgreSQL and SQL Server targets load in bulk.
  • Fast: a million rows of six masked columns, two of them one-to-one keys, in under 8 seconds on one core with the optional native masker, and 74 without; more cores for wide tables. Either way the masks are the same.
  • Incremental loads: extract only what changed since the last successful run.
  • A dependency graph: jobs run in order, concurrently where they can, each in its own process with an optional timeout.
  • Operable: webhook alerts; run state, history and manifests each in a file or a table, with the seconds each job spent reading, masking and writing; a read limit per source, so a copy takes no more of production than it was given; and passwords from a command for cloud IAM tokens.
  • Studio, a web console for the team (preview): sign in to watch runs as they go, start, rerun and cancel them, review new columns, read each job's trend, hand a reviewer a run's evidence, and edit jobs -- on your own infrastructure, with roles and a record of who did what. See Studio.
  • No infrastructure: a pip install, some YAML, and a command you run from cron. Studio is optional, and one more command.

Documentation

ribeiro11075.github.io/bauta, for the release you have installed, or read it here in docs/:

Start with For
Install and Quickstart the drivers, the native masker, and a first run
Guides one task each: masking a table, keeping joins, subsets, proving the copy safe, running it on a schedule
Reference every file, field, strategy and command
How it works and the security model the design, and what masking protects and what it doesn't
Changelog what changed in each release, breaking changes first

Install

Python 3.10 or newer. Choose the drivers you need as extras; each is loaded only when a connection uses it.

pip install "bauta[postgresql,oracle]"

Install lists every extra, and the optional native masker, which masks about ten times as fast.

Quickstart

Start from the configuration in example/starter/configuration/, from a clone or downloaded from GitHub:

mkdir configuration
cp example/starter/configuration/*.yaml configuration/

Edit configuration/connections.yaml and configuration/jobs.yaml for your databases, then supply the credentials they reference:

export SOURCE_DB_PASSWORD=...  TARGET_DB_PASSWORD=...  MASKING_KEY=...

bauta validate           # check the configuration, offline
bauta run --dry-run     # check connections and tables, moving nothing
bauta run                # run every job once

To see it work without any of that, the demos in a clone of this repository use throwaway SQLite databases:

git clone https://github.com/ribeiro11075/bauta.git && cd bauta
pip install -e ".[fpe]"

python example/walkthrough/demo.py       # the whole workflow: discover, subset, audit, mask, verify, synthesize
python example/incremental/demo.py       # streaming and incremental loads
python example/masking/demo.py           # masking, discovery and a subset, from Python
python example/native-masking/demo.py    # Python against Rust, and Rust on one core against all of them

The command

bauta run                run every job that's due, once
bauta validate           check the configuration, without connecting
bauta jobs               show the job graph and which jobs are due
bauta status             show what's running now, and where each job stands
bauta history            show recent job outcomes

bauta discover           propose a masking policy for tables
bauta subset             generate jobs that copy a referentially complete subset
bauta schema             create target tables from source ones, in the target's dialect
bauta synthesize         fill tables with generated rows, for data that can't be copied
bauta clear              empty the jobs' target tables, children first

bauta audit              report what each job does with data, and what to question
bauta coverage           list a source database's tables and what the jobs do with each
bauta verify-manifest    check a masking manifest is unaltered, and who signed it
bauta verify-references  count rows in the copy whose foreign key points at nothing
bauta bench              measure how fast each job reads and masks from its real source, writing nothing

bauta studio serve       run Studio, the web console (pip install "bauta[studio]")

bauta --version          print the version, and which masker it would use
Exit code Meaning
0 Every job completed.
1 A job failed, or was skipped because a predecessor failed, or the command failed on a database error.
2 Invalid configuration or usage.
130 Interrupted by a signal: running jobs finished, the rest were skipped.

run makes one pass and exits, so it fits under cron or a Kubernetes CronJob. A second run sharing the same run state refuses to start while the first is still going, except that runs of different jobs with --job, as an orchestrator starts one task per job, go side by side; the same job never runs twice at once (see overlapping runs). bauta <command> --help lists every flag.

Every command and flag is on its own page under commands.

Layout

Path What it is
bauta/configuration/ reading and validating the YAML: ${NAME} and passwordCommand in environment.py, the models in models.py
bauta/database/ streaming and loading rows in connection.py, swaps and what a stage table is given in maintenance.py; what differs between the seven databases in dialects/, one module each
bauta/jobs/ runner.py runs a cycle of jobs, each in a process of its own (workers.py) moving rows a chunk at a time (pipeline.py); run state in memory.py, history and manifests in reporting.py
bauta/masking/ the keyed hash, Strategy and masking plans in core.py, the built-in strategies in strategies/, one module a kind
bauta/transform/ per-column transforms, applied before masking, and the ones that ship in builtinTransforms.py
bauta/generate/ discover, subset, schema and synthesize: what is built from a live schema
bauta/review/ audit, coverage and verify-references: reports that move no data
bauta/log/ logging, and the scrubbing that keeps values out of every message
bauta/cli/ the bauta command, one module per group of subcommands
bauta/project.py a configuration directory as the command reads it, and its checks as data: what the commands and Studio share
bauta/studio/ Studio, the web console: its API, accounts, and what it keeps; installed with the studio extra
studio/ Studio's web app, in React (studio/web/), built into bauta/studio/static, and a demo to try it on (studio/demo/)
mask-rs/ the optional native masker, in Rust — see its README
example/ runnable demos, each with its configuration/, and a starter configuration — see its README
docs/ the documentation above
tests/ the test suite, laid out like the package; see where the tests are

License

MIT

Metadata

Release files for bauta 0.2.11

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

Source distribution (sdist)

Source distribution for bauta 0.2.11
File Size Uploaded Provenance Actions
bauta-0.2.11.tar.gz 1.2 MB With provenance Details for bauta-0.2.11.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bauta 0.2.11
File Interpreter ABI Platform Actions
bauta-0.2.11-py3-none-any.whl Python 3 none any Details for bauta-0.2.11-py3-none-any.whl

Total release size: 2.4 MB

Release files / bauta-0.2.11.tar.gz

Download URL bauta-0.2.11.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
3143fb583974a6ca1312c9225b8d0fa97764d10be59d7fc7bf3c1131ea9e382a
BLAKE2b-256 checksum
How to use checksums
580554190ae4acffc6fc6b390b13d35d2f1b556e52f97bfdd199aac9a9c03900
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 21, 2026.

Transparency log

Release files / bauta-0.2.11-py3-none-any.whl

Download URL bauta-0.2.11-py3-none-any.whl
Size 1.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
0b97dc590426574daab601331af33a60562e5c36629fdebe0511e940a25b434b
BLAKE2b-256 checksum
How to use checksums
45935c826fb8a918d521a8cad3060c7d42deef11036a7bba4981c7370eee975b
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 21, 2026.

Transparency log

Security for bauta 0.2.11

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 bauta-0.2.11.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 21, 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.

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