Pybricks is Python coding for smart LEGO® hubs. Run MicroPython scripts directly on the hub, and get full control of your motors and sensors.
Pybricks runs on LEGO® BOOST, City, Technic, MINDSTORMS®, and SPIKE®. You can code using Windows, Mac, Linux, Chromebook, and Android.
Click on any device below to see its documentation. Use the menu on the left to find documentation for additional modules. You may need to click the ☰ icon above to reveal this menu.
main
Note
You are viewing the stand-alone version of the documentation. To learn more about Pybricks and to start coding, visit the Pybricks website
Note
Are you using LEGO MINDSTORMS EV3? Check out the EV3 documentation instead.
Programmable hubs
Powered Up motors and sensors
hubs/index pupdevices/index iodevices/index parameters/index tools/index robotics signaltypes
blocks/index
micropython/builtins micropython/exceptions micropython/micropython micropython/uerrno micropython/uio micropython/ujson micropython/umath micropython/urandom micropython/uselect micropython/ustruct micropython/usys