Skip to main content

Unofficial Aseba Python bindings

Project description

Pyaseba

Pyaseba provides Python bindings for Aseba using pybind11.

Aseba is a light-way communication protocol and scripting language which works from tiny micro-controllers to your fully feature PC, developed at EPFL Lausanne. For the words of its authors

Aseba is a set of tools which allow novices to program robots easily and efficiently. For these reasons, Aseba is well-suited for robotic education and research. Aseba is an open-source software created by Dr. Stéphane Magnenat with contributions from the community.

It is known as the scripting language of the educational Thymio robot. Programming it is normally done in a GUI client, like Aseba Studio or the Thymio VPL.

Pyaseba offers an alternative to GUI clients to interact with any robot that runs Aseba (or more generally with any Aseba network). With Pyaseba, you can perform common operations like reading and writing Aseba variables or loading Aseba scripts but also more low-level actions, like sending and receiving Aseba messages directly.

Pyaseba provides two interfaces: 1) a lower-level client API that let you interact with a collection of Aseba nodes and 2) a higher-level client node API to interact with a single Aseba node, exposing to Python its native variables, events and functions. The clients can connect to multiple Aseba networks at once, each comprising potentially multiple Aseba nodes.

Moreover, it comes with its own local Aseba network that runs Aseba nodes implemented in Python, i.e., nodes with Python native functions and Python control steps. Its primary motivation is to test the client interfaces but it may be used to extend an Aseba network with custom nodes, for example for teaching.

Installation

Build from source

pip install https://github.com/jeguzzi/pyaseba.git

or fetch pre-build wheels

pip install pyaseba

Example

Assuming a Thymio is connected to one of the serial ports, we can use pyaseba to interact with it from Python

>>> from pyaseba import Client
>>> client = Client()
>>> client.connect("ser:name=Thymio")
1
>>> node, _ = client.wait_node()

to read Aseba variables, like the proximity sensor readings,

>>> client.get_variable(node, "prox.horizontal")
[3860, 4339, 2546, 0, 0, 0, 0]

to set Aseba variables, e.g. to change LED colors

>>> client.set_variable(node, "leds.top", [0, 32, 0])

to load and run Aseba scripts, e.g. to play a sound

>>> client.load_script(node, "call sound.system(1)")
>>> client.cmd_run(node)

Pyaseba also exposes the Aseba low-level messaging protocol, for instance to send

from pyaseba.client.msgs import ListNodes
>>> client.send_message(ListNodes())

and receive message

>>> client.get_message()
(NodePresent(source=48069, version=9), 1)

The repository and the documentation contains an extensive collection of examples.

Documentation

The documentation is published online.

License and Dependencies

Pyaseba is distributed under MIT license. It make use of the open source dependencies listed below without redistributing them.

Aseba

Pyaseba can be build using the version of Aseba maintained by the Aseba-community and distributed under LGPL-3.0 license or the version maintained by the Mobsya association, also distributed under LGPL-3.0 license.

The Mobsya version include additional message to interact with the latest version of the Thymio robot.

Pyaseba is using Aseba source code without redistributing it.

Dashel

Pyaseba uses the source code of Dashel, distributed under BSD-3-Clause license, without redistributing it.

Pybind11

Pyaseba is using Aseba source code without redistributing it.

Spdlog, Fmt and pybind11_log

If pyaseba is build with logging support, it uses Spdlog, fmt, and pybind11_log without redistributing them.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

pyaseba-0.0.3-cp314-cp314-manylinux_2_35_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.35+ x86-64

pyaseba-0.0.3-cp314-cp314-manylinux_2_35_aarch64.whl (2.8 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.35+ ARM64

pyaseba-0.0.3-cp314-cp314-macosx_15_0_x86_64.whl (916.6 kB view details)

Uploaded CPython 3.14macOS 15.0+ x86-64

pyaseba-0.0.3-cp314-cp314-macosx_15_0_arm64.whl (841.5 kB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

pyaseba-0.0.3-cp313-cp313-manylinux_2_35_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.35+ x86-64

pyaseba-0.0.3-cp313-cp313-manylinux_2_35_aarch64.whl (2.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.35+ ARM64

pyaseba-0.0.3-cp313-cp313-macosx_15_0_x86_64.whl (916.1 kB view details)

Uploaded CPython 3.13macOS 15.0+ x86-64

pyaseba-0.0.3-cp313-cp313-macosx_15_0_arm64.whl (839.9 kB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

pyaseba-0.0.3-cp312-cp312-manylinux_2_35_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.35+ x86-64

pyaseba-0.0.3-cp312-cp312-manylinux_2_35_aarch64.whl (2.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.35+ ARM64

pyaseba-0.0.3-cp312-cp312-macosx_15_0_x86_64.whl (915.9 kB view details)

Uploaded CPython 3.12macOS 15.0+ x86-64

pyaseba-0.0.3-cp312-cp312-macosx_15_0_arm64.whl (839.7 kB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

File details

Details for the file pyaseba-0.0.3-cp314-cp314-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for pyaseba-0.0.3-cp314-cp314-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 1092d6ba8eaa54d996e666812748c89567810ef0524b85395ebc4e991b545ee2
MD5 b30b8f7a0b641a63e352694ece995ed9
BLAKE2b-256 5c85cdb8071dda176f15221d9c9f98a30c0f64daa1567200095a6a3e780a20d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaseba-0.0.3-cp314-cp314-manylinux_2_35_x86_64.whl:

Publisher: release.yaml on jeguzzi/pyaseba

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyaseba-0.0.3-cp314-cp314-manylinux_2_35_aarch64.whl.

File metadata

File hashes

Hashes for pyaseba-0.0.3-cp314-cp314-manylinux_2_35_aarch64.whl
Algorithm Hash digest
SHA256 8cc5a13f4c495c12c4e9be2e664857d8de8d561fb16fe6ee70c3ceb6587660c8
MD5 bd2840546082ecfa5dbe83589956bb2e
BLAKE2b-256 1183f1a9afa60f14f42c09a679581d92a18e53d27fc061bcba6bd8a0b9491d46

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaseba-0.0.3-cp314-cp314-manylinux_2_35_aarch64.whl:

Publisher: release.yaml on jeguzzi/pyaseba

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyaseba-0.0.3-cp314-cp314-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for pyaseba-0.0.3-cp314-cp314-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 c974b148d0990cc64e8d60c5abe7f3cf278f6630b5e55ddbb34599403dcb90c4
MD5 2f2b77ba11712891f05dbc21a05ace50
BLAKE2b-256 f3b74100a112be8d0e7f8d0c62af967bedebe9cf38c97ac5e1ea76e5ccdcacc3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaseba-0.0.3-cp314-cp314-macosx_15_0_x86_64.whl:

Publisher: release.yaml on jeguzzi/pyaseba

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyaseba-0.0.3-cp314-cp314-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pyaseba-0.0.3-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 a09bf3d029094253cb46e1dbcc69e992474712b632f3a43df1c01254de2ef3c2
MD5 cfb71097b0c155bb967009c61331747c
BLAKE2b-256 61f1a2553032c42ede0fd7c43269dfe36e56d7f4b1ad9742c4dbdd88c4ef18e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaseba-0.0.3-cp314-cp314-macosx_15_0_arm64.whl:

Publisher: release.yaml on jeguzzi/pyaseba

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyaseba-0.0.3-cp313-cp313-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for pyaseba-0.0.3-cp313-cp313-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 6366f0051d485b8d1bfbc9b57ea1c29a456481e5a95e0318e0c8c655fefb53bc
MD5 97cd2d7c82f670d358f9331f96cf1895
BLAKE2b-256 22d811c9d8cd1df2500b7ae9549165f209b472aedbfb8c70c5ee18845539b209

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaseba-0.0.3-cp313-cp313-manylinux_2_35_x86_64.whl:

Publisher: release.yaml on jeguzzi/pyaseba

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyaseba-0.0.3-cp313-cp313-manylinux_2_35_aarch64.whl.

File metadata

File hashes

Hashes for pyaseba-0.0.3-cp313-cp313-manylinux_2_35_aarch64.whl
Algorithm Hash digest
SHA256 d78e81bff09bf1009be6407fab29e35d063d2afb48585c4a120309e75784060f
MD5 3029144bd587c9f3ca45f32ffaf4961d
BLAKE2b-256 731ddda4010d2a9d4418de48c916dc5ed2ba3c242a319891f1341cf5940a8103

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaseba-0.0.3-cp313-cp313-manylinux_2_35_aarch64.whl:

Publisher: release.yaml on jeguzzi/pyaseba

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyaseba-0.0.3-cp313-cp313-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for pyaseba-0.0.3-cp313-cp313-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 bfbde82f0ad9639e0943e9d21172cf4a54c25f79df98e3d9b7cca7eb9f298ac1
MD5 501ea075a97a6a0b16c2e588ed8bd23e
BLAKE2b-256 16b64dc9636bffbce8acc97c8499316540f2a0857deec927193602a4680ef7d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaseba-0.0.3-cp313-cp313-macosx_15_0_x86_64.whl:

Publisher: release.yaml on jeguzzi/pyaseba

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyaseba-0.0.3-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pyaseba-0.0.3-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 424cce1dbe3d541c657e32e42d817c4a27db29ca99e5d5525e9c1478f908f3fa
MD5 710f2d4f6e7893125534f637b4a639c0
BLAKE2b-256 34aa99fa27dece905e6ad33df1bffc5db42a561dace39e0b6be5d51e8c5de3d0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaseba-0.0.3-cp313-cp313-macosx_15_0_arm64.whl:

Publisher: release.yaml on jeguzzi/pyaseba

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyaseba-0.0.3-cp312-cp312-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for pyaseba-0.0.3-cp312-cp312-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 965f8f58ef031686545df76c179ea7923c709b0a981dfef8a1ed7c7988e51d70
MD5 356db7993b51942aed1f095e42c00b64
BLAKE2b-256 44e8f864b169178e037484e409d39e885870b82f2d0f53190fb392a56bd585a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaseba-0.0.3-cp312-cp312-manylinux_2_35_x86_64.whl:

Publisher: release.yaml on jeguzzi/pyaseba

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyaseba-0.0.3-cp312-cp312-manylinux_2_35_aarch64.whl.

File metadata

File hashes

Hashes for pyaseba-0.0.3-cp312-cp312-manylinux_2_35_aarch64.whl
Algorithm Hash digest
SHA256 d30a4286aa36e16a7c92207d37fa7bcc6fd3cd4848d3fdd0b74e7979443f9504
MD5 d05c2a158db7b16d9ace16427b686df1
BLAKE2b-256 8c110aab01c4348fd43aa1dfa569154706258f898fd0b0ba6642cda7af636bca

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaseba-0.0.3-cp312-cp312-manylinux_2_35_aarch64.whl:

Publisher: release.yaml on jeguzzi/pyaseba

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyaseba-0.0.3-cp312-cp312-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for pyaseba-0.0.3-cp312-cp312-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 4ac54dea64da288699051aec868dc84c27bcca5d74ca29b6234f21060ca2624c
MD5 6e1b2ab5bec2e7383f427c57450612a8
BLAKE2b-256 3038992fb0efdb33b64b625a3f65bf90d41fd012c86c0680cc844543497980d0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaseba-0.0.3-cp312-cp312-macosx_15_0_x86_64.whl:

Publisher: release.yaml on jeguzzi/pyaseba

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyaseba-0.0.3-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pyaseba-0.0.3-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 216ea7611cc0a1a5f11273cbbd7e73a221b08cded4d6558fbbe2c3dc877b493f
MD5 91b85fe0bbe959e1b5b6aed168ba52f3
BLAKE2b-256 cd6d24fc77c9d0d2db69cab15178d49f1d5075cf7dc30b46f0234316bcd827f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaseba-0.0.3-cp312-cp312-macosx_15_0_arm64.whl:

Publisher: release.yaml on jeguzzi/pyaseba

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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