import requests
from requests_toolbelt.multipart.encoder import MultipartEncoder

# Send local image file to tensorflow-client 
multipart_data = MultipartEncoder(
    fields={
            # a file upload field
            'image': ('image.jpg', open('image.jpg', 'rb'), 'text/plain')
           }
    )

response = requests.post('http://tensorflow.stop.capstone.utu.fi/api/v1/classifyImage/', data=multipart_data,
                  headers={'Content-Type': multipart_data.content_type})