proto-explorer


Nameproto-explorer JSON
Version 0.3.6 PyPI version JSON
download
home_pageNone
SummaryA tool to visualize .proto file hierarchies
upload_time2025-10-21 13:01:57
maintainerNone
docs_urlNone
authorLei Yuan
requires_python>=3.10
licenseMIT
keywords protobuf grpc schema explorer streamlit
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Proto Explorer
*A lightweight, interactive browser for exploring Protobuf/gRPC hierarchies*

[![Python](https://img.shields.io/badge/python-3.10%2B-blue)]()
[![Streamlit](https://img.shields.io/badge/streamlit-app-red)](https://streamlit.io/)
[![Protobuf](https://img.shields.io/badge/protobuf-compiler-green)]()

Proto Explorer lets you **visually explore Protobuf message hierarchies** (`*.proto` files) using only the compiled Python files (`*_pb2.py`). No `.proto` files or regeneration required.

* Expand nested message fields  
* Show `oneof` group hierarchy  
* Correctly detect `map<key, value>` fields  
* Load `_pb2.py` from custom paths  
* Runs locally; no server or DB needed 

---

### 🌟 Demo Screenshot

![Proto Explorer Screenshot](https://raw.githubusercontent.com/yuanlott/grpc/main/docs/screenshot.png)

---

## 🔧 Installation

Clone the repository and install dependencies:
```text
pip install proto-explorer
```
---

## ▶️ Run the App

```bash
proto-explorer -m <compiled_protobuf_pb2_module> [-p </path/to/compiled/protobuf>]
```

## ️✍️ Example

1. Clone a test Protobuf set (example: Google Pub/Sub):
```bash
git clone https://github.com/googleapis/googleapis.git
cd googleapis
```

2. Compile the .proto files to _pb2.py:
```bash
python -m grpc_tools.protoc \
  --proto_path=. \
  --python_out=. \
  google/pubsub/v1/*.proto \
  google/api/*.proto
```

Confirm that the following _pb2.py file exists:
```bash
google/pubsub/v1/pubsub_pb2.py
```

3. Launch Proto Explorer:
```bash
proto-explorer -m google.pubsub.v1.pubsub_pb2 -p .
```
```text
Launching Proto Explorer...

  You can now view your Streamlit app in your browser.

  Local URL: http://localhost:8501

Press 'q' then Enter to quit Proto Explorer.

```
Now open your browser and go to: http://localhost:8501/
Enjoy exploring your Protobuf message hierarchy!

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "proto-explorer",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "protobuf, grpc, schema, explorer, streamlit",
    "author": "Lei Yuan",
    "author_email": "lee14159@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/36/74/64f546adf1e23392f1c61d925ba37db0ea965e3f82cd3682cf9a386f6494/proto_explorer-0.3.6.tar.gz",
    "platform": null,
    "description": "# Proto Explorer\n*A lightweight, interactive browser for exploring Protobuf/gRPC hierarchies*\n\n[![Python](https://img.shields.io/badge/python-3.10%2B-blue)]()\n[![Streamlit](https://img.shields.io/badge/streamlit-app-red)](https://streamlit.io/)\n[![Protobuf](https://img.shields.io/badge/protobuf-compiler-green)]()\n\nProto Explorer lets you **visually explore Protobuf message hierarchies** (`*.proto` files) using only the compiled Python files (`*_pb2.py`). No `.proto` files or regeneration required.\n\n* Expand nested message fields  \n* Show `oneof` group hierarchy  \n* Correctly detect `map<key, value>` fields  \n* Load `_pb2.py` from custom paths  \n* Runs locally; no server or DB needed \n\n---\n\n### \ud83c\udf1f Demo Screenshot\n\n![Proto Explorer Screenshot](https://raw.githubusercontent.com/yuanlott/grpc/main/docs/screenshot.png)\n\n---\n\n## \ud83d\udd27 Installation\n\nClone the repository and install dependencies:\n```text\npip install proto-explorer\n```\n---\n\n## \u25b6\ufe0f Run the App\n\n```bash\nproto-explorer -m <compiled_protobuf_pb2_module> [-p </path/to/compiled/protobuf>]\n```\n\n## \ufe0f\u270d\ufe0f Example\n\n1. Clone a test Protobuf set (example: Google Pub/Sub):\n```bash\ngit clone https://github.com/googleapis/googleapis.git\ncd googleapis\n```\n\n2. Compile the .proto files to _pb2.py:\n```bash\npython -m grpc_tools.protoc \\\n  --proto_path=. \\\n  --python_out=. \\\n  google/pubsub/v1/*.proto \\\n  google/api/*.proto\n```\n\nConfirm that the following _pb2.py file exists:\n```bash\ngoogle/pubsub/v1/pubsub_pb2.py\n```\n\n3. Launch Proto Explorer:\n```bash\nproto-explorer -m google.pubsub.v1.pubsub_pb2 -p .\n```\n```text\nLaunching Proto Explorer...\n\n  You can now view your Streamlit app in your browser.\n\n  Local URL: http://localhost:8501\n\nPress 'q' then Enter to quit Proto Explorer.\n\n```\nNow open your browser and go to: http://localhost:8501/\nEnjoy exploring your Protobuf message hierarchy!\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A tool to visualize .proto file hierarchies",
    "version": "0.3.6",
    "project_urls": null,
    "split_keywords": [
        "protobuf",
        " grpc",
        " schema",
        " explorer",
        " streamlit"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2997a0013c0f55cddbcbd8f02ac1aef137ee04a84b47e66db03e13ac766e4850",
                "md5": "6927b2b5444c0a1919d6355b2dad7c98",
                "sha256": "802d2adbeb5b7e5611b27484dc60388ebb04b3d7938dfb3a7cedb78e660d7498"
            },
            "downloads": -1,
            "filename": "proto_explorer-0.3.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6927b2b5444c0a1919d6355b2dad7c98",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 7433,
            "upload_time": "2025-10-21T13:01:56",
            "upload_time_iso_8601": "2025-10-21T13:01:56.653778Z",
            "url": "https://files.pythonhosted.org/packages/29/97/a0013c0f55cddbcbd8f02ac1aef137ee04a84b47e66db03e13ac766e4850/proto_explorer-0.3.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "367464f546adf1e23392f1c61d925ba37db0ea965e3f82cd3682cf9a386f6494",
                "md5": "1487b7425a1f4e18bf705290e45dfbc3",
                "sha256": "beace40a28406d005e11422464c0ea118e9deb00370d00e02a21e80d4bb97f03"
            },
            "downloads": -1,
            "filename": "proto_explorer-0.3.6.tar.gz",
            "has_sig": false,
            "md5_digest": "1487b7425a1f4e18bf705290e45dfbc3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 6081,
            "upload_time": "2025-10-21T13:01:57",
            "upload_time_iso_8601": "2025-10-21T13:01:57.402727Z",
            "url": "https://files.pythonhosted.org/packages/36/74/64f546adf1e23392f1c61d925ba37db0ea965e3f82cd3682cf9a386f6494/proto_explorer-0.3.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-21 13:01:57",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "proto-explorer"
}
        
Elapsed time: 1.67255s