# leicacam
[![build-badge]][build]
[![pypi-version]][pypi]
[![wheel]][pypi]
[![Documentation Status][docs-build-badge]][docs]
## Overview
Control Leica microscopes with python
## Installation
- **The latest version of leicacam requires Python 3.10+**
- If you need to keep using Python 2.7, pin your version of leicacam to 0.3.0.
Install using `pip`:
```bash
pip3 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)
```
## Documentation
See available commands in the API reference: [http://leicacam.rtfd.org](http://leicacam.rtfd.org).
## Development
Install dependencies and link development version of leicacam to pip:
```bash
pip install -r requirements_dev.txt
```
### Code formatting
We use black code formatter to automatically format the code.
```bash
black ./
```
### Testing
```bash
tox
```
### Build documentation locally
To build the documentation:
```bash
pip install -r docs/requirements.txt
make docs
```
[build-badge]: https://github.com/MartinHjelmare/leicacam/workflows/Test/badge.svg
[build]: https://github.com/MartinHjelmare/leicacam/actions
[pypi-version]: https://img.shields.io/pypi/v/leicacam.svg
[pypi]: https://pypi.org/project/leicacam/
[wheel]: https://img.shields.io/pypi/wheel/leicacam.svg
[docs-build-badge]: https://readthedocs.org/projects/leicacam/badge/?version=latest
[docs]: https://leicacam.readthedocs.io/en/latest/?badge=latest
Raw data
{
"_id": null,
"home_page": "https://github.com/MartinHjelmare/leicacam",
"name": "leicacam",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "leicacam",
"author": "Arve Seljebu",
"author_email": "arve.seljebu@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/69/18/1d705e18cb2152fec852065952416983ab3d34a9d4cbb724ed2d3ca6635a/leicacam-0.5.0.tar.gz",
"platform": null,
"description": "# leicacam\n\n[![build-badge]][build]\n[![pypi-version]][pypi]\n[![wheel]][pypi]\n[![Documentation Status][docs-build-badge]][docs]\n\n## Overview\n\nControl Leica microscopes with python\n\n## Installation\n\n- **The latest version of leicacam requires Python 3.10+**\n- If you need to keep using Python 2.7, pin your version of leicacam to 0.3.0.\n\nInstall using `pip`:\n\n```bash\npip3 install leicacam\n```\n\n## Example\n\n### Communicate with microscope\n\n```python\nfrom leicacam import CAM\n\ncam = CAM() # initiate and connect, default localhost:8895\n\n# some commands are created as short hands\n# start matrix scan\nresponse = cam.start_scan()\nprint(response)\n\n# but you could also create your own command with a list of tuples\ncommand = [('cmd', 'enableall'),\n ('value', 'true')]\nresponse = cam.send(command)\nprint(response)\n\n# or even send it as a bytes string (note the b)\ncommand = b'/cmd:enableall /value:true'\nresponse = cam.send(command)\nprint(response)\n```\n\n## Documentation\n\nSee available commands in the API reference: [http://leicacam.rtfd.org](http://leicacam.rtfd.org).\n\n## Development\n\nInstall dependencies and link development version of leicacam to pip:\n\n```bash\npip install -r requirements_dev.txt\n```\n\n### Code formatting\n\nWe use black code formatter to automatically format the code.\n\n```bash\nblack ./\n```\n\n### Testing\n\n```bash\ntox\n```\n\n### Build documentation locally\n\nTo build the documentation:\n\n```bash\npip install -r docs/requirements.txt\nmake docs\n```\n\n[build-badge]: https://github.com/MartinHjelmare/leicacam/workflows/Test/badge.svg\n[build]: https://github.com/MartinHjelmare/leicacam/actions\n[pypi-version]: https://img.shields.io/pypi/v/leicacam.svg\n[pypi]: https://pypi.org/project/leicacam/\n[wheel]: https://img.shields.io/pypi/wheel/leicacam.svg\n[docs-build-badge]: https://readthedocs.org/projects/leicacam/badge/?version=latest\n[docs]: https://leicacam.readthedocs.io/en/latest/?badge=latest\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Control Leica microscopes with python",
"version": "0.5.0",
"project_urls": {
"Homepage": "https://github.com/MartinHjelmare/leicacam"
},
"split_keywords": [
"leicacam"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a4a83edef53c3be8d4bf5df5c8b9abde959ec0bbc4d834ed8597bb819600a266",
"md5": "069cd42da3f3a0868baa74698788cbec",
"sha256": "954027864defa745941cb2b97f455f05047483cd68e5af6e9cca60ef1181ab3a"
},
"downloads": -1,
"filename": "leicacam-0.5.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "069cd42da3f3a0868baa74698788cbec",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 8104,
"upload_time": "2024-12-28T10:42:15",
"upload_time_iso_8601": "2024-12-28T10:42:15.768736Z",
"url": "https://files.pythonhosted.org/packages/a4/a8/3edef53c3be8d4bf5df5c8b9abde959ec0bbc4d834ed8597bb819600a266/leicacam-0.5.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "69181d705e18cb2152fec852065952416983ab3d34a9d4cbb724ed2d3ca6635a",
"md5": "da7c1a2a91fbd6e78573f6c0e6ea4fbd",
"sha256": "92d93e29ea933e7d8adea736488d3e56b2452904a61930594ffc02904561c286"
},
"downloads": -1,
"filename": "leicacam-0.5.0.tar.gz",
"has_sig": false,
"md5_digest": "da7c1a2a91fbd6e78573f6c0e6ea4fbd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 11150,
"upload_time": "2024-12-28T10:42:17",
"upload_time_iso_8601": "2024-12-28T10:42:17.738458Z",
"url": "https://files.pythonhosted.org/packages/69/18/1d705e18cb2152fec852065952416983ab3d34a9d4cbb724ed2d3ca6635a/leicacam-0.5.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-28 10:42:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "MartinHjelmare",
"github_project": "leicacam",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"requirements": [
{
"name": "async_timeout",
"specs": [
[
"==",
"5.0.1"
]
]
},
{
"name": "pydebug",
"specs": [
[
"==",
"1.0.3"
]
]
}
],
"tox": true,
"lcname": "leicacam"
}