Skip to main content

Control Leica microscopes with python

Project description


build-status-image pypi-version wheel


Control Leica microscopes with python


Install using pip:

pip install leicacam

Install version using asyncio. This requires Python 3.5+:

pip3 install leicacam[asyncio]


communicate with microscope

from leicacam import CAM

cam = CAM()   # initiate and connect, default localhost:8895

# some commands are created as short hands
# start matrix scan
response = cam.start_scan()

# but you could also create your own command with a list of tuples
command = [('cmd', 'enableall'),
           ('value', 'true')]
response = cam.send(command)

# or even send it as a bytes string (note the b)
command = b'/cmd:enableall /value:true'
response = cam.send(command)


See available commands in the API reference:


Install dependencies and link development version of leicacam to pip:

pip install -r requirements_dev.txt



Build documentation locally

To build the documentation:

pip install -r docs/requirements.txt
make docs

Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
leicacam-0.3.0-py2.py3-none-any.whl (8.0 kB) Copy SHA256 hash SHA256 Wheel py2.py3
leicacam-0.3.0.tar.gz (21.4 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page