Skip to content

How to Install Alfalfa Client

Maggie Sullivan edited this page Jun 13, 2023 · 1 revision

Basic Usage with Python Package

This repo is packaged and hosted on PyPI here. This package can be installed with pip using the following command:

pip install alfalfa-client

Once the package is installed, you can load it into any project and instantiate client or historian objects as follows:

import alfalfa_client.alfalfa_client as ac
import alfalfa_client.historian as ah

client = ac.AlfalfaClient
historian = ah.Historian

Setup and Testing for Development

All alfalfa-client code is available on a github repository here. This repository is setup to use:

  • pyenv for managing python versions
  • poetry for managing environment
  • pre-commit for managing code styling
  • tox for running tests in isolated build environments

Assuming poetry is installed and the necessary python versions are installed, run the following commands:

git clone https://github.com/NREL/alfalfa-client.git
cd alfalfa-client
poetry run tox

This may take some time resolving on the initial run, but subsequent runs should be faster.


Model Configuration

Openstudio

Tutorials

Guides

Reference

Modelica

Guides

Alfalfa Interaction

Tutorials

Guides

Reference

Explanation

Alfalfa Development

Guides

General

Reference

Explanation

Clone this wiki locally