Skip to main content

In-memory ONTAP-shaped reference backend for nessie-store — PyO3 bindings.

Project description

nessie-backend-mem

The in-memory reference backend for nessie-store — a HashMap-backed implementation of the full VolumeBackend ⊂ SnapshotBackend ⊂ CloneBackend stack. It passes the full conformance suite and needs no privileges or external services, so it's the zero-dependency way to script against an ONTAP-shaped backend.

Install

pip install nessie-backend-mem      # Python
cargo add nessie-backend-mem        # Rust

Usage (Python)

from nessie_backend_mem import MemBackend

b = MemBackend()
vol = b.create_volume("build-cache", size_bytes=50 * 2**30)
snap = b.create_snapshot(vol["uuid"], "pre-build")
clone = b.create_clone(vol["uuid"], snap["uuid"], "build-cache-pr1234")
assert clone["clone"]["parent_volume"] == "build-cache"

Methods return plain dicts in the substrate-neutral domain shape (size_bytes, vol_type, clone={parent_volume, parent_snapshot}) and raise NessieError on failure. The ONTAP wire shape (size, type, clone.is_flexclone, HAL _links) is produced by nessie-ontap-protocol.

Usage (Rust)

use nessie_backend_core::{VolumeBackend, VolumeSpec};
use nessie_backend_mem::MemBackend;

let b = MemBackend::new();
let vol = b.create_volume(VolumeSpec::named("build-cache")).unwrap();

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_mem-0.2.0-cp312-cp312-manylinux_2_34_x86_64.whl (312.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

File details

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

File metadata

File hashes

Hashes for nessie_backend_mem-0.2.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 0fc06b08517e15d0341812f5939fbdb717697007ffcdd8c464293bd09ad6f753
MD5 e25877bf87d5efaff290e06d37cf5ba4
BLAKE2b-256 a87e05ff64f0fe6b69e48466b473e120145cb665979b578722e0181cda712806

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