Skip to main content

bacnet-ip-rest-client

An async Python client for the BACnet/IP REST proxy. It is built on httpx.

from bacnet_ip_rest_client import Client, ProxyError

async with Client("https://bacnet-proxy.example.net", token) as client:
    for obj in await client.list_objects("my-device"):
        print(obj.objid, obj.name, obj.access)

    temp = await client.read_property("my-device", "analog-input,1", "present-value")
    slots = await client.read_property("my-device", "analog-value,5", "priority-array")
    await client.write_property("my-device", "analog-value,5", "present-value", 21.5, priority=10)
    await client.write_property("my-device", "analog-value,5", "present-value", None, priority=10)  # relinquish

Relationship to bacpypes3

Client has the same role as a bacpypes3 Application, and read_property() and write_property() take bacpypes3's arguments, with some exceptions. It doesn't try to hide the ways an HTTP proxy works differently from a BACnet/IP stack:

bacpypes3 this client
Addressing a device BACnet Address the proxy's device id: a configured alias, or a hostname/IP[:port]
Object identifiers ObjectIdentifier with an ObjectType enum ObjectIdentifier(type: str, instance: int), also a 2-tuple; parses "analog-value,1"
Values decoded into the property's BACnet datatype JSON as the proxy sends it: enumerations as numbers, bit strings as lists of bools. REAL properties of analog objects are always float, including NaN/±Infinity
Errors ErrorPDU/RejectPDU/AbortPDU, which derive from BaseException, and are sometimes returned instead of raised always raised, all derived from ProxyError(Exception), see below
Object discovery read object-list, then each object's properties list_objects(): the proxy's cached catalog with names, units and access, in one request
ReadPropertyMultiple one request, one transaction none. read_properties() sends concurrent single reads, each with its own result
WriteProperty with array index supported not supported by the proxy
Authorization none a bearer token per Client. The proxy's rules decide what it may read and write (ObjectSummary.access)

Errors

Exception Cause Retried
CommunicationError proxy unreachable, or a reply that couldn't be decoded yes
BadRequestError 400, malformed request no
UnauthorizedError 401, token not accepted no
ForbiddenError 403, the proxy's authorization denies the request no
NotFoundError 404, unknown device, object or property no
ValueRejectedError 422, the device rejected the written value no
BACnetError 502, BACnet Error/Reject/Abort from the device; error_class/error_code hold its numeric Error_Class/Error_Code yes, except unknown-object/unknown-property
BACnetTimeoutError 504, the device didn't answer yes

ProxyStatusError.is_unknown_object_or_property is true when the proxy reports a missing object or property, whether it does so as a 404 or as a 502 from the device. Code that probes for optional properties, such as priority-array, can check this one attribute.

Retries use exponential backoff as configured by RetryPolicy (default: 5 attempts, 1s doubling to at most 8s). Retry warnings are logged to the bacnet_ip_rest_client logger. Writes are retried too, since writing the same value at the same priority again has no further effect.

concurrency (default 10) caps the number of requests one Client has in flight. The proxy serializes traffic to the device itself; this cap only keeps a large read_properties() from opening hundreds of connections to the proxy.

Development

uv run pytest

Metadata

Release files for bacnet-ip-rest-client 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bacnet-ip-rest-client 1.0.0
File Size Uploaded Provenance
bacnet_ip_rest_client-1.0.0.tar.gz 53.8 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for bacnet-ip-rest-client 1.0.0
File Interpreter ABI Platform
bacnet_ip_rest_client-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 67.0 kB

Release files / bacnet_ip_rest_client-1.0.0.tar.gz

Download URL bacnet_ip_rest_client-1.0.0.tar.gz
Size 53.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d1503e2b8db08823ce4af7630d6d6b0f516866682ef12cbf30584b9213c47451
BLAKE2b-256 checksum
How to use checksums
1f6f2b0af792b400f8538be009ba4a99aeefb46ec0bdec69e4d6b85ad9442a9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / bacnet_ip_rest_client-1.0.0-py3-none-any.whl

Download URL bacnet_ip_rest_client-1.0.0-py3-none-any.whl
Size 13.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
69a41ab7365765b5d770930d727edb30191d14d8c66627ea8f787cac8da5667c
BLAKE2b-256 checksum
How to use checksums
bf208fc9e18193441f009165b89c645ed179cc995add47f56e7cc7d5cf2e12df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Security for bacnet-ip-rest-client 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for bacnet_ip_rest_client-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page