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
File details
Details for the file protobuf-uml-diagram-0.12.tar.gz
.
File metadata
- Download URL: protobuf-uml-diagram-0.12.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee61c3dfd08070efa03f17297d05bc9017ec6de509e9333f7c581ea742316978 |
|
MD5 | 3cf408cab4b89752098aa9ea086400a4 |
|
BLAKE2b-256 | 8c1c553c894a2fa9fdb746ec6eb4c2dee4ce955b0874d0179d837fae6d83c621 |
File details
Details for the file protobuf_uml_diagram-0.12-py3-none-any.whl
.
File metadata
- Download URL: protobuf_uml_diagram-0.12-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94a628b30c80016fc233cf0dd82f6b2da83abe0dd02bd2ee134acea316f8de50 |
|
MD5 | 44406f9698856c390017a26314619584 |
|
BLAKE2b-256 | 9d9818eabbd0681e26f5a7ba1001de6a77fe4bc796523d4a32f81a9f594a8356 |