Skip to main content

Validate a Python-authored nessie-store backend against the conformance suite.

Project description

nessie-backend-conformance

The substrate-agnostic conformance suite every nessie-store backend must pass — and the inside extension point: write a storage backend in Python and validate it against the exact same suites a Rust backend passes.

Install

pip install nessie-backend-conformance      # Python
cargo add nessie-backend-conformance         # Rust (dev-dependency)

Usage (Python) — validate a Python-authored backend

from nessie_backend_conformance import run_all, ConformanceError

class MyBackend:
    def capabilities(self): return {"snapshots": True, "clones": True, "replication": False}
    def create_volume(self, name, size_bytes): ...
    def get_volume(self, uuid): ...        # return None when absent
    # … list_volumes / delete_volume / patch_volume / access_handle
    # … create_snapshot / list_snapshots / get_snapshot / delete_snapshot / create_clone

run_all(MyBackend())   # raises ConformanceError on the first violation

Methods exchange plain domain-shaped dicts ({uuid, name, state, style, vol_type, size_bytes?, clone?} for volumes). A Rust adapter wraps the Python object and runs the suites by calling back into Python under the GIL. See examples/python_backend.py for a complete reference backend.

Usage (Rust)

nessie_backend_conformance::run_all(&my_backend);  // panics on the first violation

Dual-licensed MIT OR Apache-2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nessie_backend_conformance-0.2.0-cp312-cp312-manylinux_2_34_x86_64.whl (461.3 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

File details

Details for the file nessie_backend_conformance-0.2.0-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for nessie_backend_conformance-0.2.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e7b774c6f65f0f811111c2e5259ab6386dba4aa81c1854ac095e3f32c45e6fe4
MD5 9cf7ad46fd0fa541ac2392f0cee64606
BLAKE2b-256 c900dc86e80174ca046a3a973c42efbd437ea09647a5721824a2dda9e9b9afa1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page