formart thrift file
Project description
thrift-fmt
thrift formatter
NOTE
等不及有空实现 https://github.com/alingse/thrift-parser 了,
打算先用 ptsd https://github.com/wickman/ptsd 来做一版
实在是看到公司一些文件乱七八糟的
TODO
- 单文件解析
- 定义格式 空格/换行/注释
- 支持 include?
- 封装成 python package
- struct 依赖排序(生成 python 代码会有依赖问题)
- 补充 optional/required
- 校正类型
- 兼容注释
python simple.py tutorial/tutorial.thrift
ptsd 不足
- comment 丢失
- default 值丢失
- optional required 丢失
- extends 后面的是一个
- 非逗号 + 2 space tab 风格
LICENSE
tutorial 目录从 https://github.com/apache/thrift/blob/master/tutorial/ 中 copy 过来
是 Apache 证书的
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
thrift-fmt-0.1.0.tar.gz
(4.8 kB
view details)
Built Distribution
File details
Details for the file thrift-fmt-0.1.0.tar.gz
.
File metadata
- Download URL: thrift-fmt-0.1.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 965b2c512c28e8c4b29c376fc94b737aa901b88452355516426808ff8262432a |
|
MD5 | 9a06d9f38412ae7cc2173b6d8f7d1280 |
|
BLAKE2b-256 | 1fbb514b0e8782a0f8f6567bb6b0f0d37482e60f55f0f8f5ea8fc173ac615546 |
Provenance
File details
Details for the file thrift_fmt-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: thrift_fmt-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff2e8206f2f98ff7a95f47599b4804155064afd805a10625830e3409653eb7f8 |
|
MD5 | 4baa5b3b3319f8351ee405319565cd23 |
|
BLAKE2b-256 | da9abca2706d148c9db5db9bbf75489f10e24056306b4b4047d265e5dde3d76a |