jr 简介
Installation
pip install jr
目录结构说明
├── demo jr 插件示例 demo 目录
│ └── pipeline pipeline demo 目录
│ ├── input 待编译DSL文件目录
│ ├── output 编译输出的文件目录
│ ├── rule DSL 语法描述文件目录
│ └── template DSL 模板文件目录
├── doc jr 文档目录
├── jr jr 引擎所在的目录
├── requirements.txt jr 项目依赖文件列表
├── setup.py setup 文件
├── LICENSE LICENSE 文件
├── MANIFEST.in MANIFEST 文件
├── README.md README 文件
└── test 单元测试目录
快速入门
新建文件夹,做为应用根目录
mkdir zion_demo
cd zion_demo
创建应用描述文件
appinfo.ini
编写配置文件
[appinfo]
app_name = zion_demo # 应用名
app_version = 1.0.0 # 应用版本号
rule = python_tx # DSL 语法描述文件, 默认支持 'python_tx', 'json_tx', 'pipeline_tx', 可自定义,指定自己的tx文件路径
input_path = input # 待编译 DSL 文件存放路径
output_path = output # 编译后输出文件存放路径
output_prefix = JR_ # 编译后输出文件前缀
output_ext = html # 编译后输出文件后缀
template_path = template # 模板文件路径
extension = jr:ZionExtension # 使用的扩展类,默认支持 'jr:ZionExtension', 'jr:JsonExtension', 'jr:PipelineExtension', 可自定义,指定自己的扩展类, 格式 {module_name}:{class_name}
创建对应的文件夹
mkdir input output template
创建模板文件
...
创建 DSL 文件
submit_demo.py
编写 DSL 文件
from ..lib.textbox import *
from ..lib.submit import *
mer_id = Textbox()
mer_id.caption = "商户号"
mer_id.id = "mer_id"
mer_id.disabled = "true"
op_id = Textbox()
op_id.caption = "操作员号"
op_id.id = "login_operator_id"
op_id.disabled = "true"
test_info_1 = Textbox()
test_info_1.caption = "测试信息一"
test_info_1.id = "test_info_1"
test_info_2 = Textbox()
test_info_2.caption = "测试信息二"
test_info_2.id = "test_info_2"
test_info_3 = Textbox()
test_info_3.caption = "测试信息三"
test_info_3.id = "test_info_3"
btn_submit = Submit()
btn_submit.text = "提交信息"
btn_submit.callback = "showApiMsg"
btn_submit.func = "post"
btn_submit.url = "http://127.0.0.1/submit_demo"
编译 DSL 文件
jr compile
Metadata
Release files for jr 0.1.1.5
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 |
|---|---|---|---|---|
| jr-0.1.1.5.tar.gz | 9.0 kB | Without provenance | Details for jr-0.1.1.5.tar.gz |
Release files / jr-0.1.1.5.tar.gz
| Download URL | jr-0.1.1.5.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
52db7a7e6bd4c8d411765cfe3c701cf1259b64c0d8c415ccdc8f398271a6f8c7
|
|
BLAKE2b-256 checksum How to use checksums |
9c85f0105a406b181191bd80a04fdcf9c0da5fa9102268a38073ec36c689a739
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.6
|
Security for jr 0.1.1.5
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.