Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

romnn/grpc-web-proto-compile

Repository files navigation

grpc-web-proto-compile

Build Status

PyPI version

License

Test Coverage


NOTE: This package has been superseded by romnn/proto-compile, which provides the same functionality but offers a lot more flexibility and supports more targets than just grpc-web.

This is a small script tailored to be used in CI environments and piplines to completely take care of generating typescript grpc stubs from protobuf files.

$ pip install grpc_web_proto_compile

To compile a directory with your proto files, simply run:

$ grpc_web_proto_compile path/to/your/proto/sources ./out
$ grpc_web_proto_compile --help # For a list of available options

If you cloned the repository, the command looks like:

$ git clone https://github.com/romnn/grpc-web-proto-compile
$ cd grpc-web-proto-compile/
$ python -m grpc_web_proto_compile.cli ./tests/sample/ ./out

Development

For detailed instructions see CONTRIBUTING.

Tests

You can run tests with

$ invoke test
$ invoke test --min-coverage=90     # Fail when code coverage is below 90%
$ invoke type-check                 # Run mypy type checks

Linting and formatting

Lint and format the code with

$ invoke format
$ invoke lint

All of this happens when you run invoke pre-commit.

Note

This project is still in the alpha stage and should not be considered production ready.

About

python package for generating typescript grpc-web stubs from protobuf files.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages