PyCyphal v2, implementing draft Cyphal v1.1, has been merged into master and is published on PyPI as pycyphal2. The new version offers a radically simpler API and it mostly just works out of the box; also, it has about four times fewer lines of code than v1.
Read the docs and run the examples: https://opencyphal.github.io/pycyphal
from pycyphal2 import Node, Instant
from pycyphal2.udp import UDPTransport
async def main():
node = Node.new(UDPTransport.new(), "my_node")
pub = node.advertise("sensor/temperature")
await pub(Instant.now() + 1.0, b"21.5")
sub = node.subscribe("sensor/temperature")
async for arrival in sub:
print(arrival.message)
All data serialization-related concerns have been removed from the library. To use DSDL, one must use Nunavut/PyDSDL directly instead. Compatibility with other serialization formats is now a first-class feature.
The work on Cyphal v1.1 remains experimental so while early adoption is encouraged, expect wire compatibility breakages at any moment. Bugs afoot.
The old PyCyphal v1 is still available as pycyphal from PyPI, ensuring that both versions can coexist in the same Python environment.