Skip to main content

pyBROTlib

Python interface to BROT telescopes, talking to the telescope's TwinCAT/PLC control system over MQTT.

Installation

uv add pybrotlib

Usage

Connect a transport (currently MQTT) to a named telescope and drive it through the BROT object:

import asyncio

from pybrotlib import BROT
from pybrotlib.transport import MQTTTransport


async def main() -> None:
    transport = MQTTTransport(host="localhost", port=1883)
    brot = BROT(transport, "MyTelescope")

    # the transport needs its own task to receive telemetry/publish commands
    asyncio.create_task(transport.run())
    await asyncio.sleep(2)  # give it a moment to connect and receive first telemetry

    await brot.telescope.track(ra=10.5, dec=41.2)
    print(brot.telescope.status)


asyncio.run(main())

transport.telemetry holds the live telemetry tree (see pybrotlib/telemetry.py), which is kept up to date by messages received on <telescope>/.../Telemetry topics and read by the component properties below.

Components

Each BROT instance exposes one component per subsystem, all constructed from the same transport and telescope name:

  • telescope (BROTTelescope) — pointing (track, move), offsets (set_offset_ha, set_offset_dec, set_offset_alt, set_offset_az), power/park/stop/reset, and status (status, motion_state, global_status).
  • focus (BROTFocus) — position, set(focus), powered, referenced.
  • dome (BROTDome) — shutter/tracking state, open, close, start_tracking, stop_tracking, park, reset.
  • roof (BROTRoof) — roll-off roof state, open, close, stop, reset.
  • mirrorcovers (BROTMirrorCovers) — status, open, close.

All commands are fire-and-forget MQTT publishes; callers are expected to poll telemetry (directly, or via the component's status properties) to observe the result.

Development

uv sync --group dev
uv run pytest

Metadata

Release files for pyBROTlib 1.2.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 pyBROTlib 1.2.0
File Size Uploaded Provenance Actions
pybrotlib-1.2.0.tar.gz 6.4 kB Without provenance Details for pybrotlib-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyBROTlib 1.2.0
File Interpreter ABI Platform Actions
pybrotlib-1.2.0-py3-none-any.whl Python 3 none any Details for pybrotlib-1.2.0-py3-none-any.whl

Total release size: 17.2 kB

Release files / pybrotlib-1.2.0.tar.gz

Download URL pybrotlib-1.2.0.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f22ca4288c29704d6e74f00aa691aa16f96dc3e5c6b2460e4e2b60d81e942b88
BLAKE2b-256 checksum
How to use checksums
80aa1756caeb6e4f2b1ea5c2d34a8f90942d5af6759db4709acadb172835b463
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pybrotlib-1.2.0-py3-none-any.whl

Download URL pybrotlib-1.2.0-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7ccbe25a8e2fcb70364f8e26ac9af8cd75cc819051232d093b0d0932afb57958
BLAKE2b-256 checksum
How to use checksums
d55200e6c561ceb25f8025bfb741ff25f7080d61a9098850c4d423e518d4380d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for pyBROTlib 1.2.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files No provenance

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