Skip to main content

A tool to control the script pipeline, which means that scripts can be executed in a specified order.

Project description

louvijan

louvijan is a tool to control the script pipeline (not limited to Python scripts), which means that scripts can be executed in a specified order. In addition, it is recommended because it is lightweight, fast and easy to use.

Why does it have this strange name? Because it is similar to the pronunciation "li煤shu菒xi脿n" of pipeline in Chinese.

Installation

You can install louvijan with pip:

pip install louvijan

Examples

In one word, easy to use! After reading, please show your thumb.

If you have a series of scripts that need to be executed in a certain order, as shown in the figure:

In the figure, A to G represent scripts respectively. First execute A, then execute B, C, D at the same time, then execute E, F at the same time, and finally execute G.

Let's describe it with louvijan:

from louvijan import PipeLine
PipeLine('A', ['B', 'C', 'D'], ['E', 'F'], 'G')()

If you want to execute B, C, D on a remote server, you can create a new configuration file remote.conf:

[remote]
ip = 127.0.0.1
port = 22
username = root
password = 123456

This is the case with louvijan:

PipeLine('A', Python(['B', 'C', 'D'], config='remote.conf'), ['E', 'F'], 'G')()

It is able to also send you an email after the script execution succeeds or fails or regardless of success or failure, by adding options in the configuration file like this:

[email]
host = smtp.qq.com
username = 12345
port = 25
authcode = ************
sender = tanyee@qq.com
receivers = one@qq.com, two@qq.com, three@qq.com
send_mail_flag = always

You can execute the following statement to generate a configuration template file:

from louvijan import Config
Config().template()

By setting the configuration file and multiple nested PipeLine, you can construct a variety of complex pipeline projects.

Moreover, it can print the information during the scripts running to the log file.

For more details, see example.py.

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

louvijan-0.1.3.tar.gz (10.6 kB view hashes)

Uploaded Source

Built Distribution

louvijan-0.1.3-py3-none-any.whl (13.1 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