Run
Scripts and Modules cli
The first section of the cli is the run section, you can run your own python scripts of your project or the cli solutions of your modules.
Script
Options
This are the available options on the run command, you can run without a specific file that will take run.py ass the running file to load
Run python files with the enviroment modules
usage: run [<file>]
Or specifying a file by adding the file path and name after the run statement.
$ mmp run [path_to_file][file_name]
The default path is the relative path so if you'r in the file folder you can run this
$ mmp run [file_name]
Example
Taking this example into consideration
Where requirements.txt file has this values
orator=0.9.9requests==2.25.1
And in the other hand run.py and run_2.py has this
import requestsfrom orator import Model
print('run '+[1 on run 2 on run_2])print(requests.get('https://google.com'))
The run.py its setted by default to the mmp run command but you can send a specific one like this.
Run.py file
In case that you want to define scripts to run simple create a run.py file with this structure.
This is the same as runing mex command so python before what you want to do is required
SCRIPTS = { 'start': "python (Here is where your scripts will go)"}
Keep in mind that run is used to mmp run a file so its not possible to use it in scripts file
Modules cli
In the case that you install a module that has some cli commands that you want to run, you can use mex.
$ mex orator make:model Example -m