---
title: "micropython-magic"
url: "https://maker.wiznet.io/Benjamin/projects/micropython-magic/"
markdown_url: "https://maker.wiznet.io/Benjamin/projects/micropython-magic/md"
type: "UCC: User Created Content"
author: "Josverl"
author_url: "https://github.com/Josverl/micropython-magic"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "Josverl"
original_url: "https://github.com/Josverl/micropython-magic"
license: "MIT license (MIT)"
published: "2023-07-04"
language: "en"
tags: ["MicroPython"]
hardware: ["WIZnet W5500-EVB-Pico"]
likes: 0
views: 6888
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# micropython-magic

> "micropython-magic" is an extension that allows you to write and run MicroPython code in the Jupyter notebook environment.

Original author: Josverl (source: https://github.com/Josverl/micropython-magic)

## Components

- **WIZnet W5500-EVB-Pico** x 1 ([docs](https://docs.wiznet.io/Product/Chip/Ethernet/W5500/w5500-evb-pico))
- Software: **MicroPython** ([docs](http://micropython.org/))

## Documents and links

- [basic.ipynb](https://github.com/Josverl/micropython-magic/blob/74430a87267672e4d16949dd2f85b4574a44ecfe/tests/basic.ipynb) (code)

## Article

The "micropython-magic" project is an innovative extension designed to enable the execution of MicroPython code within Jupyter notebooks. It provides a seamless interface between MicroPython devices and Jupyter, allowing developers to write, test, and debug MicroPython code directly from their notebooks.

### **Key Features:**

1. **Loading and Reloading Extension**: Easily load and reload the "micropython_magic" extension within Jupyter.

2. **Device Connection**: List and connect to available MicroPython devices, such as the W5500-EVB-Pico board.

3. **File System Access**: Access and manage the file system on the MicroPython device, including listing files and directories.

4. **Code Execution**: Execute MicroPython code using line and cell magics, with support for indentation and time delays.

5. **Evaluation and Testing**: Evaluate expressions and perform various tests to ensure the proper functionality of the code.

### **W5500-EVB-Pico Board Integration:**

The project includes specific test examples utilizing the W5500-EVB-Pico board with RP2040. This integration showcases the compatibility of the extension with various MicroPython devices and provides a practical example for developers working with this particular board.

### **Example Usage:**

The provided "basic.ipynb" notebook serves as a comprehensive guide to test the basic functionality of the MicroPython magics. It includes step-by-step instructions to load the extension, connect to devices (including the W5500-EVB-Pico), execute code, and perform various tests.

### **Conclusion:**

The "micropython-magic" project is a valuable tool for MicroPython developers, educators, and enthusiasts. Its integration with the W5500-EVB-Pico board demonstrates its versatility and applicability in various scenarios. Whether you are developing IoT applications, teaching MicroPython programming, or exploring embedded systems, "micropython-magic" offers a convenient and efficient way to work with MicroPython within the familiar environment of Jupyter notebooks.

---

Source: https://maker.wiznet.io/Benjamin/projects/micropython-magic/
