Skip to main content

Simple python 2/3 library for transporting images/data to a remote machine, applying transformations and returning a response.

Project description


Simple python 3 library for transporting images to a remote machine, applying transformations and returning a response.


Start a server on the remote machine:

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()

On the local machine you can send an image and get an appropriate response:

from SimpleDataTransport import DataSender
import numpy as np

img = np.zeros((1080, 1920))

response = DataSender(img)
print(response)  # {'message': 'image received. size=1920x1080'}

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

SimpleDataTransport-1.3.tar.gz (2.9 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page