SkillAgentSearch skills...

Leicacam

Control Leica microscopes with python

Install / Use

/learn @MartinHjelmare/Leicacam
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

leicacam

<p align="center"> <a href="https://github.com/MartinHjelmare/leicacam/actions/workflows/ci.yml?query=branch%3Amain"> <img src="https://img.shields.io/github/actions/workflow/status/MartinHjelmare/leicacam/ci.yml?branch=main&label=CI&logo=github&style=flat-square" alt="CI Status" > </a> <a href="https://leicacam.readthedocs.io"> <img src="https://img.shields.io/readthedocs/leicacam.svg?logo=read-the-docs&logoColor=fff&style=flat-square" alt="Documentation Status"> </a> <a href="https://codecov.io/gh/MartinHjelmare/leicacam"> <img src="https://img.shields.io/codecov/c/github/MartinHjelmare/leicacam.svg?logo=codecov&logoColor=fff&style=flat-square" alt="Test coverage percentage"> </a> </p> <p align="center"> <a href="https://github.com/astral-sh/uv"> <img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json" alt="uv"> </a> <a href="https://github.com/astral-sh/ruff"> <img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff"> </a> <a href="https://github.com/pre-commit/pre-commit"> <img src="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=flat-square" alt="pre-commit"> </a> </p> <p align="center"> <a href="https://pypi.org/project/leicacam/"> <img src="https://img.shields.io/pypi/v/leicacam.svg?logo=python&logoColor=fff&style=flat-square" alt="PyPI Version"> </a> <img src="https://img.shields.io/pypi/pyversions/leicacam.svg?style=flat-square&logo=python&amp;logoColor=fff" alt="Supported Python versions"> <img src="https://img.shields.io/pypi/l/leicacam.svg?style=flat-square" alt="License"> </p>

Documentation: <a href="https://leicacam.readthedocs.io" target="_blank">https://leicacam.readthedocs.io </a>

Source Code: <a href="https://github.com/MartinHjelmare/leicacam" target="_blank">https://github.com/MartinHjelmare/leicacam </a>


Control Leica microscopes with python

Installation

Install this via pip (or your favourite package manager):

pip install leicacam

Example

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()
print(response)

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

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

Credits

Copier

This package was created with Copier and the browniebroke/pypackage-template project template.

View on GitHub
GitHub Stars22
CategoryDevelopment
Updated2h ago
Forks4

Languages

Python

Security Score

90/100

Audited on Apr 8, 2026

No findings