Skip to main content

Protocol Buffers file formatter.

Project description

proto-formatter

Protocol Buffers file formatter.

Install

pip install proto-formatter

Usage

  • Using default config: indents=2, equal_sign=False, all_top_comments=False
from proto_formatter.parser import PackageParser
from proto_formatter.formatter import Formatter

protobuf_obj = parser.load(proto_file_path)
formatted_proto = Formatter().to_string(protobuf_obj)
  • Specified value for all configs: indents=2, equal_sign=Ture, all_top_comments=False
from proto_formatter.parser import PackageParser
from proto_formatter.formatter import Formatter

protobuf_obj = parser.load(proto_file_path)
formatted_proto = Formatter(equal_sign=True, indents=4, all_top_comments=True).to_string(protobuf_obj)

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

proto-formatter-0.0.2.tar.gz (9.0 kB view hashes)

Uploaded Source

Built Distribution

proto_formatter-0.0.2-py3-none-any.whl (14.6 kB view hashes)

Uploaded Python 3

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