Official MatchBox2 Python Library
🧩 Overview
MatchBox2 Python Library provides a simple and structured interface for controlling Integrated Optics MatchBox2 laser modules over USB serial communication.
It offers:
- High-level API for laser operations
- Structured models for laser info, settings, and readings
- Built-in command parsing for MatchBox2 and Combiner lasers
- Support for automatic device discovery
⚙️ Installation
Install the library directly from GitHub:
python -m pip install git+https://github.com/Integrated-optics/matchbox2py.git
or from a local clone:
git clone https://github.com/Integrated-optics/matchbox2py.git
cd matchbox2py
python -m pip install .
🚀 Quickstart
MatchBox2 Laser Example
from matchbox2 import MatchBox2Laser
available_lasers = MatchBox2Laser().get_available_lasers()
if available_lasers:
laser = MatchBox2Laser()
laser.connect(available_lasers[0].portName)
laser.set_laser_on()
readings = laser.get_laser_readings()
print(readings)
laser.set_laser_off()
laser.disconnect()
else:
print("No lasers detected.")
MatchBox2 Laser Combiner Example
from matchbox2 import MatchBox2CombinerLaser
available_lasers = MatchBox2CombinerLaser().get_available_lasers()
if available_lasers:
laser = MatchBox2CombinerLaser()
laser.connect(available_lasers[0].portName)
laser.set_enable_power()
readings = laser.get_laser_readings()
print(readings)
# Enable / disable diodes
for i in range(1, 5):
laser.set_diode_enable(i)
for i in range(1, 5):
laser.set_diode_disable(i)
laser.set_disable_power()
laser.disconnect()
else:
print("No lasers detected.")
🪪 License
This project is licensed under the MIT License — see the LICENSE file for details.
🌐 Links
- Homepage: https://integratedoptics.com
- Repository: https://github.com/Integrated-optics/matchbox2py
- Contact: info@integratedoptics.com
© 2025 Integrated Optics
Metadata
Release files for matchbox2py 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| matchbox2py-0.1.6.tar.gz | 7.6 kB | Without provenance | Details for matchbox2py-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| matchbox2py-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for matchbox2py-0.1.6-py3-none-any.whl |
Total release size: 19.0 kB
Release files / matchbox2py-0.1.6.tar.gz
| Download URL | matchbox2py-0.1.6.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eb54c9540ff839049b3d219c9aeae6d4232fe48a6ad09cf6c93a63cca7484e16
|
|
BLAKE2b-256 checksum How to use checksums |
b3c77aae390f9c7e9638ea38822f89b77d9eef8035cf635c9bbd9cb383d02d59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.13
|
Release files / matchbox2py-0.1.6-py3-none-any.whl
| Download URL | matchbox2py-0.1.6-py3-none-any.whl |
|---|---|
| Size | 11.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
89f9f10a3abd5cadfcb340c528303237c7fcc21ab6d5113e886fce060368a317
|
|
BLAKE2b-256 checksum How to use checksums |
66b09ab94a5c2612c868aa85be65df260c37a09f7219a9b2408f05618c40b997
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.13
|
Security for matchbox2py 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.