Registry / testing / keboola-vcr

keboola-vcr

JSON →
library0.5.0pypypiunverified

A library for recording, sanitizing, and validating HTTP and database interactions for Keboola component tests using VCR-based cassettes. Version 0.5.0 adds DB VCR support for recording/replaying database interactions. Regular releases, active development.

pip install keboola-vcr
INSTALL
IMPORT
SIG · KEBOOLA-VCR
K
keboola-vcr
testingpythonv0.5.0
Install
2.4s avg
Import
Disk
21MB
Pass rate
8/ 10
Env Coverage8 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.5.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 2.7s
py 3.11
✓ —
✓ 2.5s
py 3.12
✓ —
✓ 2.2s
py 3.13
✓ —
✓ 2.3s
py 3.9
✕ build_error
✕ build_error
21MB installed
● package 21MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

KeboolaVcr
from keboola import KeboolaVcr
from keboola_vcr import KeboolaVcr

Basic usage: create a KeboolaVcr instance with sanitizers and use a cassette for recording/replaying HTTP interactions.

from keboola_vcr import KeboolaVcr vcr = KeboolaVcr( cassette_library_dir='cassettes', record_mode='once', sanitizers=['KBC::ComponentConfig::%s::#token'] ) with vcr.use_cassette('test_get_users.yaml') as cassette: # Your HTTP calls go here, they will be recorded/replayed pass
Debug
Known issues
breakingVersion 0.2.0 introduced memory usage improvements and sanitizer dedup; older cassettes may need regeneration.
fix
Regenerate cassettes by deleting them and re-running tests with record_mode='all'.
affects: <0.2.0
deprecatedThe old import path `from keboola_vcr import VCR` is deprecated in favor of `KeboolaVcr` since v0.1.0.
fix
Use `from keboola_vcr import KeboolaVcr`.
affects: >=0.1.0
gotchaDbVcr requires SQLAlchemy and a database engine; it does not auto-detect database type.
fix
Manually create an SQLAlchemy engine and pass it to DbVcr.
affects: >=0.5.0
Upgrade
Version history
0.5.0latest on PyPI · released Apr 23, 2026
Audit
Dependencies
vcrpyrequiredCore VCR recording engine
pyyamlrequiredCassette YAML serialization
sqlalchemyoptionalDatabase VCR support (optional for DB recording)
Agent activity
12 hits · last 30 days
node
12
Resources
keboola-vcr — pip install keboola-vcr · libregistry