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.3.1-cp310-abi3-win_amd64.whl (318.5 kB view details)

Uploaded CPython 3.10+Windows x86-64

nessie_backend_conformance-0.3.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.3.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.3.1-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (835.4 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.3.1-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for nessie_backend_conformance-0.3.1-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 09ff3b89339e761a8294dadbf3db6a1454cf1ee3634e1b34fa3efb48fe925b6c
MD5 84ad9ef11e1fc9a5992853f0d7338cc3
BLAKE2b-256 41172ac9bf6c9fafa26fc848848b465bb65df4e2a58d98858420193336045b7f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nessie_backend_conformance-0.3.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9fd14ba8b3c36c7ff120e912385e3ee1909563bfdab874fb182d2904045fd99f
MD5 7e91c3759b0bd5129b28f4024f898ea6
BLAKE2b-256 589e130098b67414f20e30f6c146f3fa440825e359aaccdfd6b43a897e2dee2f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nessie_backend_conformance-0.3.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 929d934191c48efc2459402cb84d0b2056ea8749f94ce009ecd96a8edd3cae71
MD5 519020764d07bba927159ccdb0c6c782
BLAKE2b-256 a89ee99f72caf16bf35ef1ee321e8acb22827efa5d7b6f443439d57ddee14343

See more details on using hashes here.

File details

Details for the file nessie_backend_conformance-0.3.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.3.1-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 f8d8fee7ee476012c99e9bfcbb857fe85e7de461d6cedc52710ef02e035c9f34
MD5 40adb384f41578b1d528bcf0bcc155a3
BLAKE2b-256 9bcef38827fe942fd51ad45ff826f0058b9c07468fb8a1e573a1ccc7e170d9a0

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