#1176 Python client Phable now supports nhaystack

Rick Jennings Sat 23 Aug

I am happy to share the latest Phable version now supports nhaystack without required external package dependencies.

In just a few lines of code Haystack tagged data can be retrieved from a Niagara device with nhaystack in a Pandas DataFrame as shown in the below example.

import os

from dotenv import load_dotenv

from phable import HaystackClient

# load environment variables to preserve secrets
load_dotenv()
URI = os.getenv("URI")
USERNAME = os.getenv("USERNAME")
PASSWORD = os.getenv("PASSWORD")

client = HaystackClient.open(URI, USERNAME, PASSWORD, content_type="zinc")
df = client.read_all("point").to_pandas()
print(df)

Please note Phable is still experimental and a considerable amount of code was recently added to make this happen. Feel free to submit any issues to the Phable project on GitHub here.

Login or Signup to reply.