https://github.com/irusland/iprotopy
Automatic .proto to python dataclasses code generation
https://github.com/irusland/iprotopy
dataclasses-python protobuf
Last synced: 9 months ago
JSON representation
Automatic .proto to python dataclasses code generation
- Host: GitHub
- URL: https://github.com/irusland/iprotopy
- Owner: irusland
- Created: 2024-09-25T19:19:36.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-11T22:40:59.000Z (about 1 year ago)
- Last Synced: 2025-03-26T19:03:18.768Z (10 months ago)
- Topics: dataclasses-python, protobuf
- Language: Python
- Homepage:
- Size: 439 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# iprotopy
`iprotopy` is a Python project designed to generate source files from Protocol Buffers (protos) using the `PackageGenerator` class.
##
```python
import logging
from pathlib import Path
from iprotopy import PackageGenerator
logging.basicConfig(level=logging.DEBUG)
if __name__ == '__main__':
generator = PackageGenerator()
base_dir = Path().absolute().parent
generator.generate_sources(
proto_dir=base_dir / 'protos',
out_dir=base_dir / 'package',
)
```
## Features
- Generates source files from Protocol Buffers.
- Packages the generated sources for easy usage.
```sh
pip install iprotopy
```
## Development
### Installation