keboola.vcr
VCR recording, sanitization, and validation for Keboola component HTTP interactions
What it is and what it does
keboola.vcr is a testing utility that records real HTTP interactions made by Keboola data components, stores them as replayable JSON cassettes, and sanitizes sensitive data before saving. It wraps vcrpy and freezegun to capture and replay API responses deterministically, letting you test components against recorded interactions without hitting live APIs repeatedly.
The package's main value is its sanitization layer: it can redact secrets and tokens from cassettes before storage (cassette-only mode), or redact sensitive fields from responses before the component even reads them (scrub_before_read mode), preventing real customer data from leaking into test outputs. It also validates component output against snapshots to catch regressions.
Use it for:
- Record live API responses during component development, then replay them in CI/CD without external API calls or rate limits.
- Redact API keys, tokens, and customer PII from cassettes before committing them to version control.
- Prevent real sensitive data from reaching component output by scrubbing response fields before the component processes them.
- Generate test directory scaffolding from component configuration definitions to standardize test setup.
- Compare component output snapshots across runs to detect unintended behavior changes or regressions.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Records, sanitizes, and validates HTTP interactions for Keboola component testing by capturing real API responses as JSON cassettes and redacting secrets before storage or component consumption.
Yes, if you are testing Keboola components that make HTTP calls. The package solves a real problem—capturing and replaying API interactions safely—with low install friction and active maintenance. Its scrub_before_read feature is particularly valuable for preventing real customer data from leaking into test outputs. Not relevant for non-HTTP or non-Keboola testing scenarios.
Install
keboola-vcr on PyPI
pip
pip install keboola-vcruv
uv add keboola-vcrpoetry
poetry add keboola-vcrInstalling keboola.vcr
Before you install
Low friction: pure Python wheel with only three runtime dependencies (vcrpy, freezegun, typing-extensions). Active maintenance with a release 11 days ago and no known vulnerabilities.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open and proprietary projects.
Quickstart
pip install keboola.vcr
from keboola.vcr.recorder import VCRRecorder
from keboola.vcr.sanitizers import DefaultSanitizer
recorder = VCRRecorder(
cassette_dir="tests/cassettes/my_test",
secrets={"api_key": "secret"},
)
Requires Python 3.10 or later.
Verify before relying
- Whether scrub_before_read mode works reliably across all output formats (CSV, Parquet, direct-to-Storage) mentioned in the description.
- Performance characteristics when recording large HTTP interactions or many sequential requests.
- Compatibility with async/concurrent HTTP libraries beyond what vcrpy natively supports.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — vcrpy, freezegun, typing-extensions |
| Maintenance | actively maintained — 11 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 129,136/month — #11,679 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: keboola_vcr-0.7.1-py3-none-any.whl
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
asciinemaRecords and replays terminal sessions, saving…
copyleft · top 5,000 on PyPI
pytest-vcrA pytest plugin that integrates VCR.py to…
permissive · top 5,000 on PyPI
vcrpyVCR.py records HTTP interactions during test…
permissive · top 1,000 on PyPI
pytest-recordingA pytest plugin that records and replays HTTP…
permissive · top 5,000 on PyPI
keboola.componentWraps the Keboola Common Interface to simplify…
permissive · top 15,000 on PyPI
betamaxBetamax records and replays HTTP interactions…
permissive · top 15,000 on PyPI
kbcstoragePython client for the Keboola Storage API that…
permissive · top 15,000 on PyPI
placeboPlacebo records and replays AWS API calls…
permissive · top 15,000 on PyPI
eradicateEradicate detects and removes commented-out…
permissive · top 5,000 on PyPI