PyMDrive
PyMDrive is a python driver for MDrive motors. It has wrappers for standard commands (home, move absolute, move relative, etc.) and any other MCode command can be added easily.
Installation
It is easiest to install with pip: pip install pymdrive
You can also install with uv by cloning the repo and using uv sync.
Usage
To get started do
from pymdrive import MdriveAxis, MdriveComm
COMM = MdriveComm("COM3")
await COMM.start()
X = MdriveAxis(comm=COMM, name="X")
Y = MdriveAxis(comm=COMM, name="Y")
This initializes the COMM and starts its asynchronous queue for processing commands without race conditions. The COMM is then passed to Axis instances where the names are those specified on the motors memory.
From there, you can send standard commands
await X.move_relative(1000)
await Y.move_absolute(0)
There's a testing.ipynb notebook in the tests directory with these and other commands.
Metadata
Release files for pymdrive 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pymdrive-1.0.0.tar.gz | 10.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pymdrive-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.3 MB
Release files / pymdrive-1.0.0.tar.gz
| Download URL | pymdrive-1.0.0.tar.gz |
|---|---|
| Size | 10.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9104bf9eaabe480ee2e8621decb0fd0f82bbd1e1ed7c317be0d7e052596c376d
|
|
BLAKE2b-256 checksum How to use checksums |
911afa2a0b06ecbd0909da3527174bde2803f96fad577df3a620998d35b48be3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.22
|
Release files / pymdrive-1.0.0-py3-none-any.whl
| Download URL | pymdrive-1.0.0-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2a7a0c749ee0410e8086e802eef5ecf004d3dd76f2b2320d7fd3f9b1041bd055
|
|
BLAKE2b-256 checksum How to use checksums |
f7a23165e13ea32692ec8d7764c1aaa3bdca0ca3c0ff2a18686d16c464e8d308
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.22
|