Skip to main content

Tool for creating nanowire tools with the flask structure.

Project description

Nanowire flask

This library is designed to allow a python developer to easily create a nanowire plugin using the flask APIs structure.

The function you mount, using the class ImagesAPI, must have the arguments img and variables if you want initialise a model or other variables when the sever starts you may make the function to be mounted into a function of a class which is initiated with the desired variables. In this case your variables will be self, img and variables. You should expect img to be a PIL RGB image object and variables to be a dictionary containing the variables sent to the plugin in the curl request.

The curl requests for images may be formatted 2 ways. The first involves sending the image as a file attached to the curl request. For example:

curl -F "image=@./1.jpg" -XPOST http://0.0.0.0:5000/model/predict?threshold=0.5

alternativly the file may be sent as a link using a dictionary eg.

curl -X POST -H "Content-Type:application/json" -d '{"contentURL":"http://127.0.0.1:8000/1.jpg", "threshold":0.5}' http://0.0.0.0:5000/model/predict

At the moment it can only handle images however it will soon be expanded to handle text and eventually video and sound. The currently supported image formats are:

  • jpg

  • png

  • bmp

  • tif

  • ppm

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

nanowire_flask-0.0.13.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nanowire_flask-0.0.13-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file nanowire_flask-0.0.13.tar.gz.

File metadata

  • Download URL: nanowire_flask-0.0.13.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/2.7.15rc1

File hashes

Hashes for nanowire_flask-0.0.13.tar.gz
Algorithm Hash digest
SHA256 794581f0d28f5338444e1841058e44b118d350a77909a300c4edc1222b4770af
MD5 d119d46c890a4a67095baef0299bc593
BLAKE2b-256 6601f6279d41f37a19e12746f92a205dcd709d925a0890ef645ad8e2304a5c4d

See more details on using hashes here.

File details

Details for the file nanowire_flask-0.0.13-py3-none-any.whl.

File metadata

  • Download URL: nanowire_flask-0.0.13-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/2.7.15rc1

File hashes

Hashes for nanowire_flask-0.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 efe7ee3618b6fadc6f0366081c4c94ffb84f132f3d45dde9cf6197739bd240d9
MD5 0f84ae13aaaeff420973ad0eab4868e1
BLAKE2b-256 1442451c282814d998bfbddb09b3bd43270edfb7830576d92d3755d715266b76

See more details on using hashes here.

Supported by

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