Metadata-Version: 2.4
Name: pybricks-client
Version: 1.0.0b1
Summary: Client library for the Pybricks service
Keywords: pybricks,lego,micropython,bluetooth,robotics
Author: The Pybricks Authors
Author-email: The Pybricks Authors <dev@pybricks.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Embedded Systems
Classifier: Typing :: Typed
Requires-Dist: pybricks-core>=1.0.0b1
Requires-Dist: anyio>=4.14
Requires-Dist: mpy-cross-v6>=1.1.1
Requires-Dist: typing-extensions>=4.15
Maintainer: David Lechner
Maintainer-email: David Lechner <david@pybricks.com>
Requires-Python: >=3.11
Project-URL: homepage, https://pybricks.com
Project-URL: repository, https://github.com/pybricks/pybricks-tools
Project-URL: documentation, https://pybricks.com/pybricks-tools/reference/
Project-URL: Changelog, https://github.com/pybricks/pybricks-tools/blob/main/packages/pb-client/CHANGELOG.md
Project-URL: Support, https://github.com/pybricks/support/discussions
Project-URL: Issues, https://github.com/pybricks/support/issues
Description-Content-Type: text/markdown

# pybricks-client

Talk to a [Pybricks](https://pybricks.com) hub from your own Python program.

```python
import anyio
import pb_client


async def main() -> None:
    async with pb_client.connect() as pb:
        hub = await pb.connect_hub(name="Rover")
        print(f"connected to {hub.name}, firmware {hub.firmware}")


anyio.run(main)
```

The connection is held by a background service that outlives your program, so
the next one to run finds the hub already there. It is async throughout, and
everything it opens is closed for you when the `async with` block ends.

**Looking for the command line?** That is `pybricks-cli`, which installs `pb`
and uses this library underneath.

> **Status:** beta. Commands and APIs may still change before 1.0.0.
