haystack-py¶
Asynchronous Project Haystack client and server library for Python 3.13+.
haystack-py implements the Project Haystack protocol for exchanging tagged
building/IoT data with an async-first architecture built on Python’s native
asyncio framework. It provides HTTP and WebSocket transports, four wire
formats (JSON, Zinc, Trio, CSV), SCRAM-SHA-256 and mTLS authentication,
pluggable storage backends, and full ontology support.
import asyncio
from hs_py import Client
async def main():
async with Client("http://server/api", "admin", "secret") as c:
about = await c.about()
points = await c.read("point and temp and sensor")
asyncio.run(main())
Head to Getting Started for installation and first steps, or browse the HTTP Client to see what haystack-py can do. For server setup with storage backends, see HTTP Server and Storage Backends.
Getting Started
User Guide
Project