Pre-release
This release is a pre-release and may not be stable for production use.
ds-provider-mock-py-lib
Mock provider for DS pipeline e2e testing. Read-only, deterministic,
CDC-style change batches that bronze can load as a real ds.providers
plugin.
Installation
pip install ds-provider-mock-py-lib
Or using uv:
uv pip install ds-provider-mock-py-lib
Quick Start
from uuid import uuid4
from ds_provider_mock_py_lib import (
MockDataset,
MockDatasetSettings,
MockLinkedService,
MockLinkedServiceSettings,
)
linked_service = MockLinkedService(
id=uuid4(),
name="mock-ls",
version="1.0.0",
settings=MockLinkedServiceSettings(),
)
dataset = MockDataset(
id=uuid4(),
name="mock-ds",
version="1.0.0",
linked_service=linked_service,
settings=MockDatasetSettings(row_count=25),
)
linked_service.connect()
dataset.read()
assert len(dataset.output.index) == 25
linked_service.close()
Features
- Deterministic snapshot and incremental CDC batches
- Scriptable connect, auth, and per-request failures
- Xledger-style checkpoint (
incremental+pagination) - Pagination resume after injected read failures
Usage
Full load then one incremental change batch:
dataset.settings.incremental_insert_count = 5
dataset.settings.incremental_update_count = 3
dataset.settings.incremental_noop_count = 2
dataset.checkpoint = {}
dataset.read() # batch 0, all inserts
state = dataset.checkpoint
dataset.checkpoint = state
dataset.read() # batch 1: new keys, changed hashes, identical re-delivery
Requirements
- Python 3.11 or higher
ds-resource-plugin-py-libpandas
Documentation
Full documentation is available at:
Development
git clone https://github.com/grasp-labs/ds-provider-mock-py-lib.git
cd ds-provider-mock-py-lib
uv sync --all-extras --dev
make test
See the README for more information.
License
This package is licensed under the Apache License 2.0. See the LICENSE-APACHE file for details.
Support
- Issues: GitHub Issues
- Releases: GitHub Releases
Metadata
Release files for ds-provider-mock-py-lib 0.1.0a3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ds_provider_mock_py_lib-0.1.0a3.tar.gz | 24.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ds_provider_mock_py_lib-0.1.0a3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 53.4 kB
Release files / ds_provider_mock_py_lib-0.1.0a3.tar.gz
| Download URL | ds_provider_mock_py_lib-0.1.0a3.tar.gz |
|---|---|
| Size | 24.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
17b1a6cb4c3c1e0f71df8e8ecca21fc422388d87b831c6b7164e1c66b6b9f704
|
|
BLAKE2b-256 checksum How to use checksums |
9e4c3838584396c8d898a03d891e72914cb9ed3ef65930ca00df0f7251b7a273
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / ds_provider_mock_py_lib-0.1.0a3-py3-none-any.whl
| Download URL | ds_provider_mock_py_lib-0.1.0a3-py3-none-any.whl |
|---|---|
| Size | 28.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
72ef13a2688f5142d7194914b35613f5cee7f5a539e56c6c640bb425225a99da
|
|
BLAKE2b-256 checksum How to use checksums |
66394f621aabc991c994cc9f20f0f1c4c1136544df5ab4e4bf6134cfc0fb8d1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|