pyhaystack.client.entity.mixins package

Submodules

pyhaystack.client.entity.mixins.equip module

‘equip’ related mix-ins for high-level interface.

class pyhaystack.client.entity.mixins.equip.EquipMixin

Bases: object

A mix-in used for entities that carry the ‘equip’ marker tag.

find_entity(filter_expr=None, limit=None, single=False, callback=None)

Retrieve the entities that are linked to this equipment. This is a convenience around the session find_entity method.

points

First call will force reading of points and create local list

refresh()

Re-create local list of equipments

class pyhaystack.client.entity.mixins.equip.EquipRefMixin

Bases: object

A mix-in used for entities that carry an ‘equipRef’ reference tag.

get_equip(callback=None)

Retrieve an instance of the equip this entity is linked to.

pyhaystack.client.entity.mixins.point module

‘point’ related mix-ins for high-level interface.

class pyhaystack.client.entity.mixins.point.HisMixin

Bases: object

A mix-in used for ‘point’ entities that carry the ‘his’ marker tag.

his(rng='today', tz=None, series_format=None, callback=None)

Shortcut to read_series

his_read_series(rng, tz=None, series_format=None, callback=None)

Read the historical data of the this point and return it as a series.

Parameters:
  • rng – Historical read range for the ‘point’
  • tz – Optional timezone to translate timestamps to
  • series_format – Optional desired format for the series
his_write_series(series, tz=None, callback=None)

Write the historical data of this point.

Parameters:
  • series – Historical series to write
  • tz – Optional timezone to translate timestamps to
class pyhaystack.client.entity.mixins.point.PointMixin

Bases: object

value

pyhaystack.client.entity.mixins.site module

‘site’ related mix-ins for high-level interface.

class pyhaystack.client.entity.mixins.site.SiteMixin

Bases: object

A mix-in used for entities that carry the ‘site’ marker tag.

equipments

site.equipments returns the list of equipments under a site

First read will force a request and create local list

find_entity(filter_expr=None, single=False, limit=None, callback=None)

Retrieve the entities that are linked to this site. This is a convenience around the session find_entity method.

refresh()

Re-create local list of equipments

class pyhaystack.client.entity.mixins.site.SiteRefMixin

Bases: object

A mix-in used for entities that carry a ‘siteRef’ reference tag.

get_site(callback=None)

Retrieve an instance of the site this entity is linked to.

pyhaystack.client.entity.mixins.tz module

Mix-ins for entities exposing a ‘tz’ tag

class pyhaystack.client.entity.mixins.tz.TzMixin

Bases: object

A mix-in used for entities that carry the ‘tz’ tag.

hs_tz

Return the Project Haystack timezone type.

iana_tz

Return the IANA (Olson) database timezone name.

tz

Return the timezone information (datetime.tzinfo) for this entity.

Module contents