Quickstart¶
This page provides some details on how to start and use the application.
Basics¶
How to install the application and run a script:
Install the application from the Flipper Lab on your Flipper device.
Write some Python code or use one of the provided examples.
Use the qFlipper application to upload the code to your Flipper’s SD card.
Start the uPython application on your Flipper to run your Python script.
Instead of running a script, you could also use the interactive MicroPython shell from the terminal. Visit the Flipper documentation for details about the CLI in general.
Hint
Looking for a more efficient solution to copy your files or start a CLI session? Try the Flipper Zero Script SDK helper.
In case your Flipper is not responding or a script doesn’t behave as expected and won’t finish: do a reboot by pressing and holding Left and Back for 5 seconds.
Usage¶
Due to the occasional crashes upon application start, the application is especially designed to run in the background while working on the CLI from the computer.
You can use the CLI to start the application:
loader open /ext/apps/Tools/upython.fap
You can also use the CLI to start the application and run a Python script:
loader open /ext/apps/Tools/upython.fap /ext/scripts/tic_tac_toe.py
Once the application is up an running, it registers the py command in the Flipper’s CLI command registry. You can use this command to access the interactive MicroPython shell or start a script by passing the path as an argument:
py /ext/scripts/tic_tac_toe.py
Be aware, that the py command is only available as long as the application is running on the Flipper. Furthermore, you can only run one script at the time.