protools

一个实现了批量将protobuf数据自动识别为类json格式,批量将proto定义文件转为python类的命令行工具。
适用于需要转换大量的protobuf数据或proto定义文件。
暂时只在
Windows 10 x64、Ubuntu 20.04 x64的中文环境下做过测试,其他系统或语言环境如有问题欢迎提交issue。
install
pip install protools
update
pip install --upgrade protools
use
python -m protools -f ... -i ... -o ...
protools -f ... -i ... -o ...
其中-f可选参数有b2j[buf2json]、p2p[proto2python]。
其中-i是输入文件夹,-o是输出文件夹,其合法关系有一对一、多对一、多对多,当使用多对多关系时,应确保输入文件夹和输出文件夹一一对应(见demo2)。
demo
- 将
data和net文件夹中所有文件当作protobuf数据批量自动识别为类json格式并写入到json文件夹。protools -f b2j -i data -i net -o json
- 将
data和net文件夹中所有文件当作protobuf数据批量自动识别为类json格式并分别写入到data_json和net_json文件夹。protools -f b2j -i data -i net -o data_json -o net_json
- 将
proto文件夹中的所有文件当作proto定义文件批量转为python类并写入到python文件夹。protools -f p2p -i proto -o python
License
Metadata
Release files for protools 1.0.2
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 |
|---|---|---|---|---|
| protools-1.0.2.tar.gz | 14.0 MB | Without provenance | Details for protools-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| protools-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for protools-1.0.2-py3-none-any.whl |
Total release size: 28.2 MB
Release files / protools-1.0.2.tar.gz
| Download URL | protools-1.0.2.tar.gz |
|---|---|
| Size | 14.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3580b726cf8d9eb360bb7d125829c91b95bdee8a69ec39a77eb42b5acb3626ad
|
|
BLAKE2b-256 checksum How to use checksums |
6121a4e26fddec365e3f19f5bcee52f2e878feaba4e9dcf27616caa47f79e03e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.8
|
Release files / protools-1.0.2-py3-none-any.whl
| Download URL | protools-1.0.2-py3-none-any.whl |
|---|---|
| Size | 14.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1cff9df93628a82bffae6cd01b262dba7a7c8f7203931c8e2fc2227c3949cb2d
|
|
BLAKE2b-256 checksum How to use checksums |
f8d36f9d5d386c84e4e0060abfd18d7564d2b800e2b3c598907c50f485254c33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.8
|
Security for protools 1.0.2
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.