Run commands set in the pyproject.toml file
Project description
🏎️💨 pyqwe
The Quick Work Environment for Python.
Run commands quickly from the pyproject.toml file.
pip install pyqwe
Usage
Add commands to the pyproject.toml file.
[tool.pyqwe]
flask = "flask_app:run"
say_hello = "*:echo Hello World"
Python commands:
For Python, the commands are structured like (package:module):function
Package example:
project/
flask_app/
__init__.py
flask = "flask_app:run"
This command will run the function
run()
from the __init__.py
file in the flask_app
package.
Module example:
project/
app.py
[tool.pyqwe]
flask = "app:run"
This command will run the function
run()
from the app.py
file.
Now run the qwe command:
pyqwe flask
This will start the Flask app.
*:... commands:
Any command that is starts with *
will be run using subprocess.
For example:
[tool.pyqwe]
say_hello = "*:echo Hello World"
Now running the pyqwe command:
pyqwe say_hello
Will print Hello World
.
Run as shell
To run the command as a subprocess shell command, add the shell
key to the command.
[tool.pyqwe]
say_hello = "*shell:echo Hello World"
Other commands
pyqwe
-h
or --help
will display all the commands set in the pyproject.toml file.
pyqwe
__version__
will display the version of qwe.
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.