Makros Core#

These should be used for implementing Makros into a third party build system. They should be imported from the module root:

from makros import Makros

It is recommended to use the higher level functions like translate_file and translate_folder in your projects as they will experience smaller api changes, but the Makros object will provide the most flexibility. You should avoid creating instances of MakroParser directly, instead creating it via Makros.

Makros()

Responsible for tracking the progress of expensive tasks and objects that should not be run more than once.

MakroParser(file_path, global_controller)

Provides an api for parsing a single file.

translate_file(path)

Parses a file and writes its output to disk at the same location with ".mpy" replaced with ".py"

translate_folder(folder_path)

Will parse all ".mpy" files within a folder and write their contents to disk