Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/telamonian/numpy-protobuf
Python package that extends Python protocol buffers with an `ndarray` type (ie the Numpy array type)
https://github.com/telamonian/numpy-protobuf
numpy protobuf protocol-buffers python python-protocol-buffers
Last synced: about 2 months ago
JSON representation
Python package that extends Python protocol buffers with an `ndarray` type (ie the Numpy array type)
- Host: GitHub
- URL: https://github.com/telamonian/numpy-protobuf
- Owner: telamonian
- Created: 2019-07-12T23:30:44.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-07-14T05:54:59.000Z (over 5 years ago)
- Last Synced: 2024-10-17T22:11:12.389Z (2 months ago)
- Topics: numpy, protobuf, protocol-buffers, python, python-protocol-buffers
- Language: Python
- Size: 8.79 KB
- Stars: 19
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# numpy-protobuf
Adds support for a Numpy array type, called `ndarray`, to Python protocol buffers.
Currently just includes the `ndarray` message type. Eventually the `npbuf` packages will also include code that will extend the Python implementation of protobuf such that `ndarray` will be treated like any other protobuf built-in type. In other words, you'll be able to
1. assign a Numpy array object directly to a protobuf field
2. serialize and send that protobuf
3. receive and deserialize that protobuf
4. read a Numpy array object directly from that same fieldin just the same way as you would be able to with an `int` or `string` field.
## Compiling the Numpy protobuf files
Assuming you have `protoc` (the protobuf compiler) installed, you can automatically recompile this packages `.proto` defintion files via the `setup.py` script. Either do a developer build:
```bash
cd numpy-protobuf
pip install -e .
```or run the `ProtocCommand` directly via:
```bash
python setup.py protoc
```