bat-core
Execution Runtime Engine and Standard Action Libraries for BAT Automate RPA Platform.
Directory Structure
bat-core/
├── pyproject.toml # Project configuration & dependencies
├── requirements.txt # Package dependencies list
├── README.md # Documentation
├── bat_core/ # Core Python Package
│ ├── __init__.py
│ ├── cli.py # CLI Runner
│ ├── models/ # Flow & Execution Models (Pydantic)
│ │ ├── __init__.py
│ │ ├── flow.py
│ │ └── context.py
│ ├── engine/ # Flow Interpreter & Evaluator Engine
│ │ ├── __init__.py
│ │ ├── interpreter.py
│ │ ├── evaluator.py
│ │ └── logger.py
│ └── actions/ # Action Libraries & Registry
│ ├── __init__.py
│ ├── base.py
│ ├── registry.py
│ ├── logic.py
│ ├── data_excel.py
│ ├── web_playwright.py
│ └── http_api.py
├── examples/ # Sample Flow JSON files
│ └── sample_flow.json
└── tests/ # Unit Tests
└── test_engine.py
คู่มือการใช้งานและการสั่งรันคำสั่ง (CLI Execution Guide)
โมดูล bat-core สามารถสั่งรันกระบวนการอัตโนมัติ (RPA Flow) ผ่าน Command Line Interface (CLI) ได้ดังนี้:
1. การติดตั้งแบบ Editable (สำหรับการพัฒนา)
ติดตั้ง Package และ Dependencies ในสภาพแวดล้อม Python:
pip install -e .
2. รูปแบบคำสั่งการรันพื้นฐาน
รันผ่านสคริปต์ Python Module:
python -m bat_core.cli run examples/sample_flow.json
หรือรันผ่านคำสั่ง CLI สั้น (เมื่อทำการติดตั้ง Package แล้ว):
bat-core run examples/sample_flow.json
3. ตัวเลือกและพารามิเตอร์เสริม (CLI Options)
-
--vars(Override / Inject Variables): ส่งค่าตัวแปรจากภายนอกเข้าไปใน Flow รูปแบบ JSON Stringpython -m bat_core.cli run examples/sample_flow.json --vars "{\"target_url\": \"https://httpbin.org/get\"}"
-
--log-dir(Save Execution Logs): กำหนดไดเรกทอรีสำหรับบันทึกไฟล์ JSON Execution Logpython -m bat_core.cli run examples/sample_flow.json --log-dir "./logs"
4. การรันชุดทดสอบ (Unit Testing)
ทดสอบความถูกต้องของระบบและ Action ทั้งหมด:
python -m pytest tests/
Metadata
Release files for batautomate 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| batautomate-0.1.0.tar.gz | 10.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| batautomate-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.3 kB
Release files / batautomate-0.1.0.tar.gz
| Download URL | batautomate-0.1.0.tar.gz |
|---|---|
| Size | 10.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c0a026c8e3923a04b1cbd98e6ed38be18dc95525401a1a3356240a00f3f56aac
|
|
BLAKE2b-256 checksum How to use checksums |
7bd9d1f8648b156d125681b37dbe0e1daf6621bb457b067f515e9bfb66bb15fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.10
|
Release files / batautomate-0.1.0-py3-none-any.whl
| Download URL | batautomate-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
19bdda89daee0c87f7dc1fb287b0bb252eee6f65112ff48be046afef87cf48f8
|
|
BLAKE2b-256 checksum How to use checksums |
57cbce9cada070903757b831aeac115bbfb80a539fb5a9c759f7b36cbc4126e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.10
|