Create UML diagrams from Protobuf proto files
Project description
Protobuf UML diagram
A tool to generate UML diagrams from Protobuf compiled .proto files.
Usage:
$ protobuf-uml-diagram --proto "cylc.flow.ws_messages_pb2" --output /tmp/
Logging output:
INFO:__main__:Importing compiled proto cylc.flow.ws_messages_pb2
INFO:__main__:Writing PNG diagram to /tmp/ws_messages_pb2.png
Image output:
TL;DR
$ pip install protobuf-uml-diagram
(…)
$ file issue_10.proto # See ./test_data/ or use your own .proto file.
issue_10.proto: ASCII text
$ protoc --python_out=./ issue_10.proto
$ # The line below modifies PYTHONPATH, which is not necessary if you have a valid Python module/package.
$ PYTHONPATH=. protobuf-uml-diagram --proto issue_10_pb2 --output /tmp
INFO:protobuf_uml_diagram:Imported: issue_10_pb2
INFO:protobuf_uml_diagram:Writing diagram to /tmp/issue_10_pb2.png
$ eog /tmp/issue_10_pb2.png
Running the command above should create a final image with your diagram as seen below.
Installation
$ pip install protobuf-uml-diagram
$ protobuf-uml-diagram
Development
$ git clone https://github.com/kinow/protobuf-uml-diagram.git
$ cd protobuf-uml-diagram
$ pip install -e .
$ protobuf-uml-diagram
Docker
Generate UML diagrams from all (not compiled) .proto
files in a directory:
./dockerbuild.sh
./dockerrun.sh <path_containing_proto_files> <output_path>
License
Apache License
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
Built Distribution
Close
Hashes for protobuf-uml-diagram-0.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bebe6b315c903e8650c6d6ca5560752826a9cdba7d6505b83c7ce56cf1119e8b |
|
MD5 | 21fbcd821cc05b6b2595bad3134e84c0 |
|
BLAKE2b-256 | b28197517c829f2a2b9cf5388c26a18ebd4f9df971e85eda7a16c83acd770cee |
Close
Hashes for protobuf_uml_diagram-0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4cedef6b9665cb2887060271c19eca60a8f3250f4e9924a37e97b78c8a625ffe |
|
MD5 | 65b9689fbed4ae92951221a09e97e995 |
|
BLAKE2b-256 | 2f310fc8c7a826457fb0ec0e8c81508bc5533e1cac37191d8bd27025e09c01bc |