Skip to main content

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

Release files for mpypack 0.1.8

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

Source distribution (sdist)

Source distribution for mpypack 0.1.8
File Size Uploaded
mpypack-0.1.8.tar.gz 15.8 kB Details

Built distribution (wheel)

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

Total release size: 32.6 kB

Release files / mpypack-0.1.8.tar.gz

Download URL mpypack-0.1.8.tar.gz
Size 15.8 kB
Tags Source
SHA-256 checksum
How to use checksums
112b44122c794e1c93596aecb1479147e030977775af2144a51b882635851e79
BLAKE2b-256 checksum
How to use checksums
9acbc9d80b4a59cf17680207faa7697cffe420a43e326323c983f12002db6779
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.2

Release files / mpypack-0.1.8-py3-none-any.whl

Download URL mpypack-0.1.8-py3-none-any.whl
Size 16.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fde05683c92f370ec222547f29c6e3032f8ace3d08d9bb27ab4a61dca4ad9d8b
BLAKE2b-256 checksum
How to use checksums
ad3e625167827e745d43067e1a30e5ea0a20322f2c67f3de389d3547efead960
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.2

Release history Release notifications | RSS feed

This release

0.1.8 This release

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

3 release files

0.1.3

2 release files

0.1.2

3 release files

0.1.1

2 release files

0.1.0

3 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