A simple tool to pack up MicroPython code
Project description
mpypack
A micropython project packing tools.
Can sync folder to mpy board, compiling and packing the whole folder to another output folder.
If the command line tool is not what you need, you can use this as library, and develop your own build/packing python scripts.
Quick Overview
After place the correct config file, sync files to mpy board:
mpypack sync
Enter REPL mode:
mpypack repl
More Uesage:
Usage: mpypack [OPTIONS] COMMAND [ARGS]...
Options:
-c, --config TEXT Set config file path. (default .mpypack.conf)
-p, --port TEXT Name of serial port for connected board.
-b, --baud INTEGER Baud rate for the serial connection (default 115200).
--version Show the version and exit.
--help Show this message and exit.
Commands:
build Pack up source folder.
get Retrieve a file from the board.
repl Enter repl mode
sync Sync local file to mpy board.
Environment
This command line tool also use config file and environment values as parameters.
Avaliable environment values:
MPYPACK_CONFIG: The config file path.
MPYPACK_BAUD
MPYPACK_[UPPER_CASE_NAME_IN_CONFIG_FILE]
...
Config File
The default config file is .mpypack.conf in current workspace folder. this can be set by "-c / --config" flag.
Example config file:
[mpypack_config]
# ----board----
#>>>>----port----<<<<
# port = COM3
#>>>>----baud rate----<<<<
baud = 115200
# ----parameter----
#>>>>----sync local source----<<<<
# local = D:\Code\Micropython\ESP32\Play32
#>>>>----sync remote target----<<<<
remote = /
#>>>>----build source----<<<<
# source = D:\Code\Micropython\ESP32\Play32
#>>>>----build output----<<<<
# output = D:\Code\Micropython\ESP32\Play32\.build
#>>>>----include path RegExp----<<<<
# include = \.py$
#>>>>----exclude path RegExp----<<<<
# exclude = \.pyc$
#>>>>----include hidden file----<<<<
hidden = false
#>>>>----compile .py to .mpy----<<<<
compile = true
#>>>>----compile arch----<<<<
#arch = xtensawin
#>>>>----mpy-cross executable path----<<<<
# mpycross = D:\Code\Micropython\micropython\mpy-cross\mpy-cross.exe
Query Parameter Order
cli > env > conf_file > default
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mpypack-0.1.8.tar.gz
.
File metadata
- Download URL: mpypack-0.1.8.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 112b44122c794e1c93596aecb1479147e030977775af2144a51b882635851e79 |
|
MD5 | daf4b8f856347589a7271b69a1e0dd8c |
|
BLAKE2b-256 | 9acbc9d80b4a59cf17680207faa7697cffe420a43e326323c983f12002db6779 |
File details
Details for the file mpypack-0.1.8-py3-none-any.whl
.
File metadata
- Download URL: mpypack-0.1.8-py3-none-any.whl
- Upload date:
- Size: 16.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fde05683c92f370ec222547f29c6e3032f8ace3d08d9bb27ab4a61dca4ad9d8b |
|
MD5 | 036e0343a31d4ac9f42554e6257e3d1a |
|
BLAKE2b-256 | ad3e625167827e745d43067e1a30e5ea0a20322f2c67f3de389d3547efead960 |