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 Distributions

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

nessie_backend_conformance-0.2.1-cp310-abi3-win_amd64.whl (318.5 kB view details)

Uploaded CPython 3.10+Windows x86-64

nessie_backend_conformance-0.2.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (456.8 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

nessie_backend_conformance-0.2.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (450.3 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

nessie_backend_conformance-0.2.1-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (835.6 kB view details)

Uploaded CPython 3.10+macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

Details for the file nessie_backend_conformance-0.2.1-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for nessie_backend_conformance-0.2.1-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 11ad18daaeb9182c050400fc5dfe464b64594fef60c465493bba912f7b61689b
MD5 58ca305cb3477ff6b24a36abb684dca5
BLAKE2b-256 ed5717a9359a6b2ac26dc96a8d2e00ffc0ff0b18ea8edb72dadb37df0bce3671

See more details on using hashes here.

File details

Details for the file nessie_backend_conformance-0.2.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nessie_backend_conformance-0.2.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 aa48f7b3abf0ddf534ba37f3e549d1e35d97118a634c5ea256a8cdfe3f1dffb8
MD5 ac21f2ee2a24c5c4cbeb7843c89161a7
BLAKE2b-256 f6a758c513d8eb23cae6d694541cbef8d2f8bee9b2eb93ca1f387e85e84121bd

See more details on using hashes here.

File details

Details for the file nessie_backend_conformance-0.2.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nessie_backend_conformance-0.2.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 50b452d49d87aea48196de1556d9a66ac2f79a837361ab2055d76783397b5151
MD5 68ec4989459a17aa720aed2d57686b7b
BLAKE2b-256 9a94a0275b9faae8de9fb290de7ab4ecf0efa14249acef9c80c34b7fc5894731

See more details on using hashes here.

File details

Details for the file nessie_backend_conformance-0.2.1-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for nessie_backend_conformance-0.2.1-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 e37e9f904d65129f89bc9aef3ea6e985f886c40ab3b4fe638789170b619a49fc
MD5 acc0ed3c5ecbf1c37e173894ecabb39d
BLAKE2b-256 ccf8099ed52f3671ac5ea520faa4b1a8b7c5d2d84e1eb83bd1bd2632d3e7e7b2

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