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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bospy-0.0.18.tar.gz.
File metadata
- Download URL: bospy-0.0.18.tar.gz
- Upload date:
- Size: 162.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a379702f4185fd0ae3d6e1d3d7bbdde766a683ffb71c31cd19a641a8ec8a3c7d
|
|
| MD5 |
8abeb752cbd20a42ee89017c6f480b32
|
|
| BLAKE2b-256 |
4cdd1102dd704d465a7b6c076b54cf78ab735518347b9166911d5c6e33db7a95
|
File details
Details for the file bospy-0.0.18-py3-none-any.whl.
File metadata
- Download URL: bospy-0.0.18-py3-none-any.whl
- Upload date:
- Size: 20.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c863364e86a78a552eb7880b2cb3e2b4fd7ec61ba42c660a6b9f3b1851b369f9
|
|
| MD5 |
215937aa27e9bbda98eb142db26d515d
|
|
| BLAKE2b-256 |
4da7b875c8ee55c18ca2be62fd7d4942b4054a536d8574a8e5b6ef043677d76a
|