Skip to main content

A Python module for the FreeNAS websocket API.

Project description

Lint Build

Python Module for FreeNAS Websocket API

This python module utilizes the FreeNAS Websocket API to get state from a FreeNAS instance.

Installation

pip install pyfreenas

Usage

from pyfreenas import Machine as FreeNASMachine

machine = await Machine.create(
    "hostname.of.machine",
    username="someuser",
    password="password",
)
await machine.refresh()

Machine

Object representing a FreeNAS instance.

Disks

Available from machine.disks, contains information about the disks attached to the machine.

VirturalMachines

Available from machine.vms, contains information about the virtural machines available on the machine.

Each instance has the following methods availabe:

  • vm.start
  • vm.stop
  • vm.restart

Development

python3.8 -m venv .venv
source .venv/bin/activate

# Install Requirements
pip install -r requirements.txt

# Install Dev Requirements
pip install -r requirements-dev.txt

# One-Time Install of Commit Hooks
pre-commit install

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

pyfreenas-0.1.0.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

pyfreenas-0.1.0-py3-none-any.whl (6.4 kB view hashes)

Uploaded Python 3

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