Installation
Install the library from PyPI; the package name is pycyphal
.
Specify the installation options (known as “package extras” in parseltongue)
depending on which Cyphal transports and features you are planning to use.
Installation options
Most of the installation options enable a particular transport or a particular media sublayer implementation
for a transport.
Those options are named uniformly following the pattern
transport-<transport-name>-<media-name>
, for example: transport-can-pythoncan
.
If there is no media sub-layer, or the media dependencies are shared, or there is a common
installation option for all media types of the transport, the media part is omitted from the key;
for example: transport-serial
.
Installation options whose names do not begin with transport-
enable other optional features.
If you need full-featured library, use this and read no more:
pip install 'pycyphal[transport-can-pythoncan,transport-serial,transport-udp]'
If you want to know what exactly you are installing, read on.
can transport
This transport is implemented by pycyphal.transport.can.CANTransport
.
The following installation options are available:
- transport-can-pythoncan
This option pulls the following dependencies:
python-can[serial] ~= 4.0
serial transport
This transport is implemented by pycyphal.transport.serial.SerialTransport
.
The following installation options are available:
- transport-serial
This option pulls the following dependencies:
pyserial ~= 3.5 cobs ~= 1.1.4
udp transport
This transport is implemented by pycyphal.transport.udp.UDPTransport
.
The following installation options are available:
- transport-udp
This option pulls the following dependencies:
libpcap >= 0.0.0b0, < 2.0.0
redundant transport
This transport is implemented by pycyphal.transport.redundant.RedundantTransport
.
This transport has no installation dependencies.
loopback transport
This transport is implemented by pycyphal.transport.loopback.LoopbackTransport
.
This transport has no installation dependencies.
Use from source
PyCyphal requires no unconventional installation steps and is usable directly in its source form. If installation from PyPI is considered undesirable, the library sources can be just directly embedded into the user’s codebase (as a git submodule/subtree or copy-paste).
When doing so, don’t forget to let others know that you use PyCyphal (it’s MIT-licensed), and make sure to include at least its core dependencies, which are:
nunavut ~= 2.3
numpy ~= 1.22 ; python_version>='3.8'
numpy ~= 1.21 ; python_version=='3.7'