Metadata-Version: 2.1
Name: SimpleDataTransport
Version: 1.4
Summary: Simple python 2/3 library for transporting data to a remote machine, applying transformations and returning a response.
Home-page: https://github.com/RaymondKirk/SimpleDataTransport
Author: Raymond Tunstill
Author-email: ray.tunstill@live.co.uk
License: UNKNOWN
Description: # SimpleDataTransport
        
        Simple python 3 library for transporting data to a remote machine, applying transformations and returning a response.
        Formerly [SimpleImageTransport](https://pypi.org/project/SimpleImageTransport/).
        ## Usage
        
        Start a server on the remote machine:
        
        ```python
        from SimpleDataTransport import DataReceiver
        
        # Callback takes a single dict with an image and returns a dict of useful data
        def example_callback(data):
            img = data["image"]
            return {'message': 'image received. size={}x{}'.format(img.shape[1], img.shape[0])}
        
        
        # Initialize the Flask application
        flask_receiver = DataReceiver()
        flask_receiver.set_callback(example_callback)
        flask_receiver.run()
        ```
        
        On the local machine you can send an image and get an appropriate response:
        
        ```python
        from SimpleDataTransport import DataSender
        import numpy as np
        
        img = np.zeros((1080, 1920))
        
        response = DataSender(img)
        print(response)  # {'message': 'image received. size=1920x1080'}
        ```
Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Description-Content-Type: text/markdown
