Skip to main content

formart thrift file

Project description

thrift-fmt

thrift formatter

NOTE

等不及有空实现 https://github.com/alingse/thrift-parser 了,

打算先用 ptsd https://github.com/wickman/ptsd 来做一版

实在是看到公司一些文件乱七八糟的

TODO

  1. 单文件解析
  2. 定义格式 空格/换行/注释
  3. 支持 include?
  4. 封装成 python package
  5. struct 依赖排序(生成 python 代码会有依赖问题)
  6. 补充 optional/required
  7. 校正类型
  8. 兼容注释
python simple.py tutorial/tutorial.thrift

ptsd 不足

  1. comment 丢失
  2. default 值丢失
  3. optional required 丢失
  4. extends 后面的是一个
  5. 非逗号 + 2 space tab 风格
  6. LICENSE

    tutorial 目录从 https://github.com/apache/thrift/blob/master/tutorial/ 中 copy 过来

    是 Apache 证书的

Project details


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)

Uploaded Source

Built Distribution

thrift_fmt-0.1.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

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

Hashes for thrift-fmt-0.1.0.tar.gz
Algorithm Hash digest
SHA256 965b2c512c28e8c4b29c376fc94b737aa901b88452355516426808ff8262432a
MD5 9a06d9f38412ae7cc2173b6d8f7d1280
BLAKE2b-256 1fbb514b0e8782a0f8f6567bb6b0f0d37482e60f55f0f8f5ea8fc173ac615546

See more details on using hashes here.

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

Hashes for thrift_fmt-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ff2e8206f2f98ff7a95f47599b4804155064afd805a10625830e3409653eb7f8
MD5 4baa5b3b3319f8351ee405319565cd23
BLAKE2b-256 da9abca2706d148c9db5db9bbf75489f10e24056306b4b4047d265e5dde3d76a

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page