Metadata-Version: 2.4
Name: leicacam
Version: 0.7.0
Summary: Control Leica microscopes with python
Author-email: Martin Hjelmare <marhje52@gmail.com>
License-Expression: MIT
Project-URL: Bug Tracker, https://github.com/MartinHjelmare/leicacam/issues
Project-URL: Changelog, https://github.com/MartinHjelmare/leicacam/blob/main/CHANGELOG.md
Project-URL: documentation, https://leicacam.readthedocs.io
Project-URL: repository, https://github.com/MartinHjelmare/leicacam
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: async_timeout
Requires-Dist: pydebug
Dynamic: license-file

# 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

```python
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](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/copier-org/copier/master/img/badge/badge-grayscale-inverted-border-orange.json)](https://github.com/copier-org/copier)

This package was created with
[Copier](https://copier.readthedocs.io/) and the
[browniebroke/pypackage-template](https://github.com/browniebroke/pypackage-template)
project template.
