dryve-d1
Async Python driver for igus dryve D1 stepper/servo motor controllers over Modbus/TCP. Implements the CiA 402 (CANopen Drive Profile) state machine in pure Python — no pymodbus dependency.
Installation
pip install dryve-d1
Quick Start
import asyncio
from dryve_d1 import DryveD1
from dryve_d1.config.defaults import default_driver_config
async def main():
cfg = default_driver_config(host="192.168.1.100", unit_id=1)
drive = DryveD1(config=cfg)
await drive.connect()
try:
await drive.fault_reset()
await drive.enable_operation()
await drive.home()
await drive.move_to_position(target_position=10000)
finally:
await drive.close()
asyncio.run(main())
Features
- CiA 402 state machine — full lifecycle: enable, disable, quick stop, fault reset
- Profile position — move to absolute/relative position with velocity and acceleration
- Profile velocity — continuous velocity control
- Jog (hold-to-move) — with configurable watchdog TTL and keepalive
- Homing — configurable homing methods with timeout
- Telemetry poller — periodic status polling with
DriveSnapshotcaching - Pydantic config —
DriveConfig,ConnectionConfig,MotionLimits,RetryPolicy - Pure async — built on
asyncio, no blocking calls - PEP 561 typed — full type annotations,
py.typedmarker included - Zero heavy deps — only
pydanticrequired (nopymodbus)
Bundled Simulator
Develop and test without hardware using the included Modbus TCP simulator:
python simulator.py # starts on port 501
Then connect with host="127.0.0.1", port=501, unit_id=0.
Architecture
┌──────────────────────────────────────────┐
│ dryve_d1.api.drive.DryveD1 │ ← async facade
├──────────────────────────────────────────┤
│ dryve_d1.cia402 │ dryve_d1.motion │ ← state machine + motion profiles
├──────────────────────────────────────────┤
│ dryve_d1.protocol │ dryve_d1.od │ ← Modbus/CANopen codec + OD registers
├──────────────────────────────────────────┤
│ dryve_d1.transport │ ← TCP client, session, retry
└──────────────────────────────────────────┘
Development
git clone https://github.com/AliaksandrNazaruk/dryve-d1.git
cd dryve-d1
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
# Run tests
pytest tests/unit -m "not simulator"
# Lint & type check
ruff check src/ tests/
mypy src/dryve_d1
License
MIT © 2026 Aliaksandr Nazaruk
Metadata
Release files for dryve-d1 0.3.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 | |
|---|---|---|---|
| dryve_d1-0.3.0.tar.gz | 260.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dryve_d1-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 336.0 kB
Release files / dryve_d1-0.3.0.tar.gz
| Download URL | dryve_d1-0.3.0.tar.gz |
|---|---|
| Size | 260.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
46fd54de9aa769ddb0a321fe36cf655667f427a923cd702ab5a1e0aa1deb303c
|
|
BLAKE2b-256 checksum How to use checksums |
0de4bc26eced1da2f7d063b0f35152e05fce8de6926fd004cd8d5591097026c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.
Transparency logRelease files / dryve_d1-0.3.0-py3-none-any.whl
| Download URL | dryve_d1-0.3.0-py3-none-any.whl |
|---|---|
| Size | 75.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
300486b45a9976352a9fc477801f9ad1a398f5415a41843d4a50279655e56ac0
|
|
BLAKE2b-256 checksum How to use checksums |
2ce226b5b38a35a5a1f679b32681ed58c6b81ba538b079a356005d6d67429806
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.
Transparency log