Skip to main content

a package for accessing bos resources.

Project description

bospy

python wrappers for accessing bos services.

Points are accessed via "pointers". You get a pointer by using a query function like NameToPoint and pass the output to a function like Get or Set.

Pointers are the uri strings that uniquely identify each point in the sysmod.

Get

Get(points) takes one or more point uris and returns values for each uri passed.

Getting a single point by name:

name = 'BLDG3.AHU2.RM1.TEMP'
pt = NameToPoint(name)
value = Get(pt)
print(name, value)

Output:

$ python get_example.py
BLDG3.AHU2.RM1.TEMP 18.0

Getting multiple values by location:

pts = LocationToPoint('ROOM_1')
resp = Get(pts)
for k, v in resp.items()
    name = GetPointName(k)
    print(name, v)

Output

$ python get_multiple_example.py
BLDG3.AHU2.RM1.TEMP 22.5
BLDG3.AHU2.RM1.SETPOINT 21.0
BLDG3.AHU2.RM1.DAMPER_POS 85.0

Set

Set(points, values) takes 1 or more point uris and an equal number of values. You may also pass a single value to be written to all points.

Usage:

pt = GetPointByName('BLDG3.AHU2.RM1.SETPOINT')
ok = Set(pt, 23)
if ok:
    print('success')
else:
    print('failed to write', key)

Output:

$ python set_example.py
success

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bospy-0.0.7.tar.gz (158.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bospy-0.0.7-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file bospy-0.0.7.tar.gz.

File metadata

  • Download URL: bospy-0.0.7.tar.gz
  • Upload date:
  • Size: 158.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.4

File hashes

Hashes for bospy-0.0.7.tar.gz
Algorithm Hash digest
SHA256 832c7e7c8bdac7d1daf2f4fa7b44f32d5559d8a180c38ba432af7b1ebe549d3e
MD5 8c9330e5554adc6af3f3bf50f2a325f9
BLAKE2b-256 4fcb19f096ba6be5e1108e2e77dd953c4c29473a147be816dce9ae426f638f42

See more details on using hashes here.

File details

Details for the file bospy-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: bospy-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.4

File hashes

Hashes for bospy-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 b307d67142fbff7e44a5127a4fdf7108378660709d3eae1fb9609afcc216d192
MD5 8641801d10ba08b6e166dcdef7ad0db3
BLAKE2b-256 3ecb7e5a01f1a92bed9ec4914c60c94ca8543f3a5bf2ac3070fcd278f35ecee2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page