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

Uploaded CPython 3.10+Windows x86-64

nessie_backend_conformance-0.3.0-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.0-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.0-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (835.7 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.0-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for nessie_backend_conformance-0.3.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d102106e150193902deef8ee312e617981bfb22b2cc169956e1270dbbb3e32d9
MD5 5c820ec339dbb88a97b8702ba1f9580e
BLAKE2b-256 6d8a8c51b0f765238e09a375d8cb5dd8c23808490ca4343f4dce035b07a37f98

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nessie_backend_conformance-0.3.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7e9ec388da061913f67eb22fb809d5e469373d7ac77fef9f1b39f18eb88500ce
MD5 c19bc908d14ecc051075bb5699e91bfa
BLAKE2b-256 a87826887f1fdaa158c43a91d14063dde80ebe32281533a235236f0a9d287914

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nessie_backend_conformance-0.3.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 61d32fc28f58937c561c291f6c93d0060a85695945aeecfe04e44ea3698deb4b
MD5 6522e5941923f0e5200e8fe988d885e1
BLAKE2b-256 f77577379145d00243f23beabcaf8bfdb52d6a61d84e03a6c669430751cc8b10

See more details on using hashes here.

File details

Details for the file nessie_backend_conformance-0.3.0-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.0-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 04daabb3106b77d0039deec884fc2bd3d109cbd2a68b03219136ff4448d7c9c2
MD5 fa56d70d716055ae9911efb48b462aac
BLAKE2b-256 e405501e7526912a8323819446e0d423404c76e88f49aae943929859477f4db2

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