Skip to main content

pydobotlab

Python control for the Dobot Magician, with full coverage of the 28 Python API entries in the official DobotLab Magician manual. Use the documented function names and arguments for motion, I/O, sensors, end-effectors, the slideway, and the conveyor.

All ten ptp modes are supported. Extended control adds move_to with waiting, timeouts, and alarm handling, command batching, and live pose streaming. Run Python scripts and the optional desktop control panel separately or in parallel. A simulator supports working without hardware.

Communicates over serial using pyserial and the Dobot Communication Protocol V1.1.5; no vendor DLL or DobotStudio installation is required.

Documentation & homepage · API reference · GitHub · Report an issue

Installation

Requires Python 3.10 or newer. Install in a virtual environment:

python -m pip install pydobotlab

For the optional PySide6 desktop panel:

python -m pip install "pydobotlab[gui]"
pydobotlab-panel

The base library requires only pyserial; Qt is installed only with the gui extra. See the installation guide for virtual environments, Windows drivers, and Linux serial-port permissions. The project has been used on Ubuntu and Windows; macOS hardware has not been verified.

Quick start

With the arm connected and its workspace clear:

from pydobotlab import Magician, PTPMode

with Magician() as robot:  # auto-discover; or specify "/dev/ttyUSB0" / "COM3"
    robot.clear_alarm()
    robot.set_home()
    command_index = robot.ptp(mode=PTPMode.MOVJ_XYZ, x=220, y=0, z=50, r=0)
    robot.wait_for(command_index)
    pose = robot.get_pose()
    print(pose)

print(pose) displays x, y, z, r, and all four joint angles:

Pose(x=220.00, y=0.00, z=50.00, r=0.00, joints=[0.00, 30.00, 45.00, 0.00])

The values above illustrate the format; actual joint angles depend on the robot's pose. Access individual values with pose.x, pose.y, pose.z, pose.r, or pose.joints. Positions are in millimetres and angles are in degrees.

Dobot is also available as an alias for Magician. The documented DobotLab method names and parameters are preserved for existing scripts.

Queued commands such as ptp return a queue index; use wait_for to wait for completion. move_to combines motion and waiting in one call:

with Magician() as robot:
    robot.move_to(220, 0, 50, r=0, mode=PTPMode.MOVL_XYZ, timeout=30)

See DobotLab compatibility for the complete function list and return-value conventions.

Try it without hardware

pydobotlab-panel --simulator

Or use the simulator from Python:

from pydobotlab import Magician
from pydobotlab.simulator import install_simulator, stop_all

install_simulator(arms=1)
try:
    with Magician("/dev/sim0", via_broker=False) as robot:
        robot.move_to(220, 0, 50)
        print(robot.get_pose())
finally:
    stop_all()

The simulator supports offline examples and tests. It approximates motion and firmware behavior; it does not validate a real robot's trajectory.

Features and examples

  • Cartesian and joint motion, jogging, homing, speed settings, and continuous paths.
  • Suction cup, gripper, laser, digital I/O, sensors, and conveyor commands.
  • Structured alarms, motion-failure exceptions, and live pose streaming.
  • Firmware queue control and with robot.batch() for accumulating commands.
  • Multiple robot connections and a local broker for sharing a port between the GUI and scripts.

Start with pick and place, smiley drawing, or two arms with live panels. The user guide covers the API, control panel, broker, and wire protocol.

License

MIT. Maintained by Tal Eylon, taleylon1@gmail.com.

Metadata

Release files for pydobotlab 0.1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pydobotlab 0.1.0.1
File Size Uploaded
pydobotlab-0.1.0.1.tar.gz 122.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pydobotlab 0.1.0.1
File Interpreter ABI Platform
pydobotlab-0.1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 184.5 kB

Release files / pydobotlab-0.1.0.1.tar.gz

Download URL pydobotlab-0.1.0.1.tar.gz
Size 122.3 kB
Tags Source
SHA-256 checksum
How to use checksums
04b2089f3fa018a673cb39d8d38a48b469bd488f6d5b3fa5a8aa6c4c87e057f0
BLAKE2b-256 checksum
How to use checksums
2c3ae9e299116c567fe1b02f49d59ed1be44e39ead649fab293bb8de1a20fdc1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 12, 2026.

Transparency log

Release files / pydobotlab-0.1.0.1-py3-none-any.whl

Download URL pydobotlab-0.1.0.1-py3-none-any.whl
Size 62.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
02dffdfe28890fabeee8a763a0c004217fb50e96e8aac28a6494e0172cb95263
BLAKE2b-256 checksum
How to use checksums
a83373ed715765c300f53e02f06c01beaec9cfd498304831d4798695e5edcb94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 12, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.1

2 release files

0.2

2 release files

This release

0.1.0.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page