xref: /freebsd/sys/contrib/openzfs/contrib/pyzfs/README (revision f126890a)
1This package provides a wrapper for libzfs_core C library.
2
3libzfs_core is intended to be a stable interface for programmatic
4administration of ZFS.
5This wrapper provides one-to-one wrappers for libzfs_core API functions,
6but the signatures and types are more natural to Python.
7nvlists are wrapped as dictionaries or lists depending on their usage.
8Some parameters have default values depending on typical use for
9increased convenience.
10Enumerations and bit flags become strings and lists of strings in Python.
11Errors are reported as exceptions rather than integer errno-style
12error codes.  The wrapper takes care to provide one-to-many mapping
13of the error codes to the exceptions by interpreting a context
14in which the error code is produced.
15
16Unit tests and automated test for the libzfs_core API are provided
17with this package.
18Please note that the API tests perform lots of ZFS dataset level
19operations and ZFS tries hard to ensure that any modifications
20do reach stable storage. That means that the operations are done
21synchronously and that, for example, disk caches are flushed.
22Thus, the tests can be very slow on real hardware.
23It is recommended to place the default temporary directory or
24a temporary directory specified by, for instance, TMP environment
25variable on a memory backed filesystem.
26
27Package documentation: http://pyzfs.readthedocs.org
28Package development: https://github.com/openzfs/zfs
29