Commando
Commando is a framework for batch processing.
Versioning of this repository follows Semantic Versioning 2.0.0
subprocess.run をラッピングしているので外部コマンドのために面倒な記述をしなくて良いのが特徴。
コマンドラインツールを脳筋で実行していくバッチ処理のためのフレームワーク。 基本的にPythonの構文でワークフローを構築できるので、バッチ処理での変数の取り回しなどがしやすいのがメリット。
Shell Script や Bat ファイルを書かなくても実行したいコマンドさえわかっていればバッチ処理が書ける。
Concept
- バッチ処理ワークフローを構築するためのフレームワーク
- 逐次処理で書く
- 外部コマンドに関しては subprocess.run()が走る
Feature
add()- add command
execute():- Execute the added command.
- Process them in the order they were added.
- Functions can also be executed as commands
Usage
install
pip install pycommando
script
import logging
from commando import commando
logging.basicConfig(filename="test.log", level=logging.DEBUG)
def zero():
1 / 0
commando.add("mkdir test")
commando.add("touch test\\test.txt")
commando.add(zero)
commando.execute()
log
DEBUG:commando.commando:mkdir test
DEBUG:commando.commando:touch test\test.txt
DEBUG:commando.commando:<function zero at 0x01A177C0>
ERROR:commando.commando:Could not execute function
Traceback (most recent call last):
File "C:\venv\lib\site-packages\commando\commando.py", line 28, in execute
cmd()
File "main.py", line 10, in zero
1 / 0
ZeroDivisionError: division by zero
Metadata
Release files for pycommando 2.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pycommando-2.1.3.tar.gz | 4.0 kB | Without provenance | Details for pycommando-2.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pycommando-2.1.3-py3-none-any.whl | Python 3 | none | any | Details for pycommando-2.1.3-py3-none-any.whl |
Total release size: 8.2 kB
Release files / pycommando-2.1.3.tar.gz
| Download URL | pycommando-2.1.3.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
930852a0e30aceb0091ef3ef0d546d85278f67d9e9a488782b2eb1837a8bd78a
|
|
BLAKE2b-256 checksum How to use checksums |
2e92813f006a15585475a48924a4d7f4a3ee1ebb24880f766a4dcb99092210d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.5 Linux/5.13.0-1031-azure
|
Release files / pycommando-2.1.3-py3-none-any.whl
| Download URL | pycommando-2.1.3-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5a9050dba8e259f349246951089e16fe5a2b18969f1cc43b26ac305a0b8cf8c3
|
|
BLAKE2b-256 checksum How to use checksums |
6359421b93a5d44c5bc44c4be28bb41599438cbdc751866b796a84a0f8607bed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.5 Linux/5.13.0-1031-azure
|
Security for pycommando 2.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.