Skip to main content

modular_client_python

This Python package creates a class named ModularClient, which contains an instance of serial_interface.SerialInterface and adds methods to it, like auto discovery of available modular devices in Linux, Windows, and Mac OS X. This class automatically creates methods from available functions reported by the modular device when it is running the appropriate firmware. This is the modular device client library for communicating with and calling remote methods on modular device servers.

Authors:

Peter Polidoro <peter@polidoro.io>

License:

BSD

Example Usage:

from modular_client import ModularClient
dev = ModularClient()
# Will try to automatically find device if one available. This may be slow if it
# needs to search many serial ports. If it is not found automatically or to
# speed up, specify port directly.
dev = ModularClient(port='/dev/ttyACM0') # Linux specific port
dev = ModularClient(port='/dev/tty.usbmodem262471') # Mac OS X specific port
dev = ModularClient(port='COM3') # Windows specific port
dev.get_device_id()
dev.get_methods()
from modular_client import ModularClients
devs = ModularClients()
# Will try to automatically find all available devices. This may be slow if it
# needs to search many serial ports. If they are not found automatically or to
# speed up, specify ports to use.
devs = ModularClients(use_ports=['/dev/ttyACM0','/dev/ttyACM1']) # Linux
devs = ModularClients(use_ports='(/dev/ttyACM)[0-1]') # Linux string RE alternative
devs = ModularClients(use_ports=['/dev/tty.usbmodem262471','/dev/tty.usbmodem262472']) # Mac OS X
devs = ModularClients(use_ports='(/dev/tty\.usbmodem26247)[1-2]') # Mac OS X RE Alternative
devs = ModularClients(use_ports=['COM3','COM4']) # Windows
devs = ModularClients(use_ports='(COM)[3-4]') # Windows RE Alternative
devs.items()
# dev = devs[name][form_factor][serial_number]
devs = ModularClients(use_ports='(/dev/ttyACM)[0-1]',keys=[0,1])
dev = devs[0]
devs = ModularClients(use_ports='(/dev/ttyACM)[0-1]',keys='(device)[0-1]')
dev = devs['device0']
devs = ModularClients(use_ports='(/dev/ttyACM)[0-1]',ports_as_keys=True)
dev = devs['/dev/ttyACM0']

Metadata

Release files for modular-client 8.4.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for modular-client 8.4.3
File Size Uploaded Provenance
modular_client-8.4.3.tar.gz 9.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for modular-client 8.4.3
File Interpreter ABI Platform
modular_client-8.4.3-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 18.6 kB

Release files / modular_client-8.4.3.tar.gz

Download URL modular_client-8.4.3.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
de616dc9bdfc7703c6efd1bbe6e24e2e34a50961334af4c8404b48ae9a83e977
BLAKE2b-256 checksum
How to use checksums
1f14e8048e65ae7468d4e39a2bd317a62db86d63b9b731209dd8e78e27bc6029
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.8.2 requests/2.26.0 setuptools/58.1.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release files / modular_client-8.4.3-py2.py3-none-any.whl

Download URL modular_client-8.4.3-py2.py3-none-any.whl
Size 8.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
4589d6cb294a70dedd59c96206d70288e9269547153ad9d4939d7f0f89080f51
BLAKE2b-256 checksum
How to use checksums
e707a6cfc677d14ab7375c7fcf565186d046977e7cf3d0019e50684230d288dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.8.2 requests/2.26.0 setuptools/58.1.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Security for modular-client 8.4.3

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.

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