Skip to main content

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

Project description

SimpleImageTransport

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

Usage

Start a server on the remote machine:

from SimpleImageTransport import ImageReceiver

# Callback takes a single parameter image and returns a dict of useful data
def example_callback(img):
    return {'message': 'image received. size={}x{}'.format(img.shape[1], img.shape[0])}

# Initialize the application
image_receiver = ImageReceiver()
image_receiver.set_callback(example_callback)
image_receiver.run()

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

from SimpleImageTransport import ImageSender
import numpy as np

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

response = ImageSender(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

SimpleImageTransport-1.3.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

SimpleImageTransport-1.3-py2-none-any.whl (4.8 kB view details)

Uploaded Python 2

File details

Details for the file SimpleImageTransport-1.3.tar.gz.

File metadata

  • Download URL: SimpleImageTransport-1.3.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/2.7.12

File hashes

Hashes for SimpleImageTransport-1.3.tar.gz
Algorithm Hash digest
SHA256 8df18f56ce6299f8c0e1a656198324a33b05a4a49dc0d48bf84dc130090313bb
MD5 a62069c30a7c6fec557980744a3485c8
BLAKE2b-256 2262433866fbfe48edbb3c650cd61fd341ed475919cbf52bcfff5525880a8727

See more details on using hashes here.

File details

Details for the file SimpleImageTransport-1.3-py2-none-any.whl.

File metadata

  • Download URL: SimpleImageTransport-1.3-py2-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/2.7.12

File hashes

Hashes for SimpleImageTransport-1.3-py2-none-any.whl
Algorithm Hash digest
SHA256 f8ae0a18a58ff298c2c8af0f5351316c3822dab36a968b81427143e8c6ad0ab5
MD5 2751fadd2e04e8c62f2b90dadc522948
BLAKE2b-256 1ccfab7a2c251ff2892c4d9b060a00eff50ad4f644d228e72c79efbfe96df881

See more details on using hashes here.

Supported by

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