Skip to main content

A better Protobuf / Twirp generator & library

Project description

twirp python sdk generator

python-betterproto 生成的代码只能配合 grpc 使用,但生成的 message 确实很香。所以我重写了 service 代码生成逻辑,使其支持 twirp 协议。

我发现可以上传到 pypi,包名是 betterproto-twirp

安装

  • 本地源码安装:

    pip install . 
    
  • 从 pypi 安装:

     pip install betterproto-twirp
     安装失败的话先安装 pip install 'betterproto-twirp[compiler]' 
    

使用

protoc -I . --python_betterproto_out=. service.proto

改动历史

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for betterproto-twirp, version 1.2.16
Filename, size File type Python version Upload date Hashes
Filename, size betterproto_twirp-1.2.16-py3-none-any.whl (19.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size betterproto-twirp-1.2.16.tar.gz (17.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page