A framework for batch processing.
Project description
Commando
Commando is a framework for batch processing.
コマンドラインツールを脳筋で実行していくバッチ処理のためのフレームワーク。 基本的にPythonの構文でワークフローを構築できるので、バッチ処理での変数の取り回しなどがしやすいのがメリット。
Shell Script や Bat ファイルを書かなくても実行したいコマンドさえわかっていればバッチ処理が書ける。
コンセプト
- バッチ処理ワークフローを構築するためのフレームワーク
- 逐次処理で書く
- 外部コマンドに関しては subprocess.run()が走る
Feature
- add()でコマンド追加
- 追加された順に処理する
- execute() で追加されたコマンドの実行
- 関数もコマンドとして実行できる
課題
- エラーハンドリングとかどうする?
- エラーがあればすぐに落とす仕様にする???
Usage
import os
from commando import commando
def myprint():
print("コマンドー")
# コマンド文字列
commando.add("mkdir test")
# リスト形式のコマンド
commando.add(["touch", "test\\test.txt"])
# 独自定義の関数
commando.add(myprint)
# 追加した順でコマンドを実行
commando.execute()
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.
Source Distribution
pycommando-0.1.1.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for pycommando-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c5855ed0ee0e7d50a6915d3bfca1da01d8db1f06a1f9952ec2d060340e48db7 |
|
MD5 | 5e97f8028cf461e7fa1c5d5f2283799f |
|
BLAKE2b-256 | fe6376824a16855a247e2cd182035e5e8b7ac45ea26c431f83f9c75cfb98d149 |