Metadata-Version: 2.1
Name: numproto
Version: 0.1.1
Summary: numproto provides numpy arrays to protobuf conversion
Home-page: https://github.com/xainag/numproto
Author: numproto Contributors
Author-email: services@xain.io
License: Apache License Version 2.0
Description: # NumProto
        
        **Numproto** is a simple python3.6+ library to serialize and deserialize numpy
        arrays into and from protobuf messages.
        
        ## Installation
        
        You can install NumProto from the PyPI package:
        ```bash
        $ pip install numproto
        ```
        
        ## Usage
        
        Numproto serializes a numpy array into an `NDArray` message as specified in
        [ndarray.proto](https://github.com/xainag/numproto/blob/master/xain/protobuf/ndarray.proto):
        
        ```proto
        syntax = "proto3";
        
        message NDArray {
            bytes ndarray = 1;
        }
        ```
        
        This library provides two methods: one for serialization `ndarray_to_proto` and
        one for deserialization `proto_to_ndarray`.
        
        ```python
        import numpy as np
        
        from numproto import ndarray_to_proto, proto_to_ndarray
        
        nda = np.arange(10)
        
        serialized_nda = ndarray_to_proto(nda)
        deserialized_nda = proto_to_ndarray(serialized_nda)
        
        assert np.array_equal(nda, deserialized_nda)
        ```
        
        ## Tests
        
        To run the tests first install the numproto package from source in development
        mode and then run the tests using pytest:
        ```bash
        $ git clone https://github.com/xainag/numproto.git
        $ cd numproto
        $ pip install -e .[dev]
        
        $ pytest
        ```
        
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development
Classifier: Topic :: Scientific/Engineering
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: POSIX :: Linux
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Provides-Extra: dev
Provides-Extra: test
