Skip to main content

A Python API for ZFS

Project description

Weir is a Python API for ZFS.

The API is loosely based on libzfs, but is intended to be more Pythonic rather than reproducing the C API exactly. Key differences include:

  • ZFS datasets are represented as objects.

  • send() and receive() return open files.

Weir is implemented on top of the command-line zfs and zpool commands for portability and so as to facilitate support for remote operation without requiring installation on the remote host.

Remote datasets can be specified with urls of the form zfs://user@host/path@snapname.

Installation

Requires Python 2.6, 2.7 or 3.4+.

To install Weir, simply:

$ pip install weir

Usage

eg to find a filesystem’s most recent snapshot:

>>> from weir import zfs
>>> zfs.open('zfs://backup.local/wanaka/test').snapshots()[-1].name
'zfs://backup.local/wanaka/test@auto-2015-04-08T145240'

License

Licensed under the Common Development and Distribution License (CDDL).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

weir-0.4.0.tar.gz (5.2 kB view details)

Uploaded Source

File details

Details for the file weir-0.4.0.tar.gz.

File metadata

  • Download URL: weir-0.4.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for weir-0.4.0.tar.gz
Algorithm Hash digest
SHA256 70c96c4d4d7aa7433a884a0c55ec250587cff309ec3c730270c2b4b15feba474
MD5 f7152c87b671597a1633694fec18ba25
BLAKE2b-256 444cce3d79f1ad9d6a4910d94e3c8e6073ba0957669308f6b312d80546a342de

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page