Skip to main content

Interface to modular devices with auto creation of class methods and auto discovery of available modular devices in Linux, Windows, and Mac OS X

Project description

This Python package creates a class named ModularServer, which contains an instance of serial_device2.SerialDevice 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.


Peter Polidoro <>



Example Usage:

from modular_server import ModularServer
dev = ModularDevice() # Might automatically finds device if one available
# if it is not found automatically, specify port directly
dev = ModularDevice(port='/dev/ttyACM0') # Linux specific port
dev = ModularDevice(port='/dev/tty.usbmodem262471') # Mac OS X specific port
dev = ModularDevice(port='COM3') # Windows specific port
from modular_device import ModularDevices
devs = ModularDevices()  # Might automatically find all available devices
# if they are not found automatically, specify ports to use
devs = ModularDevices(use_ports=['/dev/ttyUSB0','/dev/ttyUSB1']) # Linux
devs = ModularDevices(use_ports=['/dev/tty.usbmodem262471','/dev/tty.usbmodem262472']) # Mac OS X
devs = ModularDevices(use_ports=['COM3','COM4']) # Windows
dev = devs[name][serial_number]

Project details

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page