Intro
I created pyhaystack a few years ago. I had discovered python and I thought I could get access to the data stored in our Jaces more easily if I could connect to them using some kind of script. I was actively participating in project-haystack as I was sure it was a very good idea. Tagging data instead of relying on point names made a lot of sense to me.
I had a lot of chance when Stuart from VRT offered to bonified the project. He brought a lot of his knowledge and made the library more robust and very flexible. In fact, we changed everything, but keeping the same idea behind.
Now we reached a point where it is well documented and it is working with the major platforms we know. Also, in the field of data analysis, python is one of the most used language competing with R, Julia and the others. I feel pyhaystack is really on its spot.
New authentication schemes supported
This new release (version 0.92) allows python to connect to haystack server running Skyspark, Skyspark v3+, Widesky, Niagara AX and Niagara4 !
Thanks to a new contributor (Pierre Sigwalt), we have been able to make pyhaystack compatible with SCRAM authentication. This was needed for Skyspark v3+ and for the new Niagara4 devices.
It’s been hard, but we succeeded !
This update also brings improvements to the syntax so it’s easier to connect and explore your haystack server.
Syntax improvements
It’s now easier to connect to a haystack server using pyhaystack.connect(args). You just provide the implementation you need and login info. You can also use a text file to store the login info. See the docs for details.
You can also use the pythonic square bracket feature over objects to make searches.
my_equip = my_session.site['my_equip_dis'] # dis of an equip znt = my_equip['ZN~2dT'] # a point name temp_sensors = my_equip['sensor and air and temp'] # a filter expression
histories
Histories are fundamental to analysis. Pyhaystack uses Pandas series and dataframes when dealing with histories.
You then gain access to a lot of nice features right out of the box. Statistical functions, model fitting, removing nan values or
filling them using last good values…
temp_sensors_his = session.his_read_frame(temp_sensors, rng='2017-04-01,2017-04-30') temp_sensors.wait() temp_sensors.result
A great tool
Those features make pyhaystack a great tool for “on the spot” analysis but also as a robust module to build global distributed analysis
application (Widesky).
More informations
pyhaystack is a 100% open source project supported by SERVISYS inc. and VRT Systems
Come and join us on https://github.com/ChristianTremblay/pyhaystack and chat with us on https://gitter.im/ChristianTremblay/pyhaystack
You can also read the docs on http://pyhaystack.readthedocs.io
You can read more about project-haystack here

