ONTAP REST envelope/HAL builders for nessie-store — PyO3 bindings.
Project description
nessie-ontap-protocol
ONTAP REST wire shapes — the HAL envelope, the {job,record,num_records} create
envelope, the simplified delete job, the always-success poll, and the
ONTAP-native {error:{code,message,target}} envelope — for
nessie-store. The PyO3
bindings let you assemble ONTAP-faithful response bodies from plain Python dicts.
Install
pip install nessie-ontap-protocol # Python
cargo add nessie-ontap-protocol # Rust
Usage (Python)
import nessie_ontap_protocol as proto
# Wrap your own record dict in ONTAP's create envelope.
volume = {"uuid": "…", "name": "build-cache", "state": "online"}
created = proto.create_response("job-1", volume)
# {"job": {"uuid": "job-1", "_links": {...}}, "record": {...}, "num_records": 1}
# A HAL collection, an error envelope, a delta duration.
coll = proto.hal_collection([volume], "/api/storage/volumes")
err = proto.error_envelope("404", "volume not found", "volume")
assert proto.iso8601_duration(3 * 3600 + 27 * 60 + 45) == "PT3H27M45S"
Usage (Rust)
use nessie_ontap_protocol::{CreateResponse, iso8601_duration};
let resp = CreateResponse::new("job-1", serde_json::json!({ "name": "vol1" }));
assert_eq!(iso8601_duration(45), "PT45S");
Dual-licensed MIT OR Apache-2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nessie_ontap_protocol-0.3.1-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: nessie_ontap_protocol-0.3.1-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 158.1 kB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
769e19950d07c64aca9dec2e1a3bd5b30e258a080ea33b9df5246c668e38401e
|
|
| MD5 |
3fb6ca55be9c66fa81585a712aca9bf3
|
|
| BLAKE2b-256 |
78a6bc6848cf8ec069735aa721db9e2db20e3a7591fabb99b9a5da64a71f5c5f
|
File details
Details for the file nessie_ontap_protocol-0.3.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: nessie_ontap_protocol-0.3.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 285.1 kB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd9f03e84837b75d6eebc3f515765d9fa39eb90f9de8a9ea6ebd276be7ca1c4c
|
|
| MD5 |
6a52b8eaf07023e6447eece921b19d00
|
|
| BLAKE2b-256 |
c905e9168c4bc07d9d65c335bcb8129ac36a11aa6d79c28c58322e7c5e6af9ee
|
File details
Details for the file nessie_ontap_protocol-0.3.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: nessie_ontap_protocol-0.3.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 281.1 kB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ceefc6d188c67d2904369bb741d0adc5df610cfd8fbd8c1f33e303e3eef5c2a1
|
|
| MD5 |
4e140aaf67ece7778c87245612244285
|
|
| BLAKE2b-256 |
c5687f40d6c3c0619bd1c34640c94430e7d029d32fea2df58f4c1713646ed6a7
|
File details
Details for the file nessie_ontap_protocol-0.3.1-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.
File metadata
- Download URL: nessie_ontap_protocol-0.3.1-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
- Upload date:
- Size: 510.4 kB
- Tags: CPython 3.10+, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38a5c94a3ed9e7fb8e2f4ba8bbb78d0f92a15c488106a2af764574dfb21c44fe
|
|
| MD5 |
740fd1a7b8a3e5b0a15c2bcd0148fed7
|
|
| BLAKE2b-256 |
baec44e35a7ec53bdf7075d762ad82483ddf1d1e01cd0c8c7406b1aee21928a4
|