Skip to main content

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 = "*cmd:echo Hello World"

Python commands:

For Python, the commands are structured like (package:module):function

Package example:

project/
    flask_app/
        __init__.py

The following command will run the function run from the __init__.py file in the flask_app package.

flask = "flask_app:run"

Module example:

project/
    app.py

The following command will run the function run from the app.py file.

flask = "app:run"

Now run the qwe command:

qwe flask

and this will start the Flask app.

CMD labeled commands:

And command that is labeled with *cmd will be ran using subprocess.

say_hello = "*cmd:echo Hello World"

Now run the qwe command:

qwe say_hello

and this will print Hello World.

Run as shell

To run the command as a subprocess shell command, add the shell key to the command.

say_hello = "*cmd-shell:echo Hello World"

Other commands

-h or --help will display all the commands set in the pyproject.toml file. __version__ will display the version of qwe.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyqwe-0.1.0.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

pyqwe-0.1.0-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page