yeyeto2788 / uminifier

Script to convert Python files into .mpy (Micropython)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

uminifier

Script to convert Python files into .mpy (Micropython)

Usage

usage: compilation_test.py [-h] [-o OUTPUT] [-k] [-v] filename

Convert python files into .mpy (Micropython) files.

positional arguments:
  filename

optional arguments:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        Output path or output filename
  -k, --keep            Keep any intermediate file generated.
  -v, --verbose         Print verbose output.

Requirements

Modules needed installation:

pip install pyminifier>=2.1 mpy-cross>=1.12

Running the tests

pytest

How to use it with docker

Converting a file

docker run -it --rm --name uminifier -v $PWD:/tmp yeyeto2788/uminifier /tmp/<file_to_convert-py> -k

About

Script to convert Python files into .mpy (Micropython)


Languages

Language:Python 95.8%Language:Dockerfile 2.6%Language:Shell 1.7%