Development kit for creating modules on apeer
Project description
APEER Python SDK
What it does
Our APEER Python SDK aka. apeer-dev-kit (ADK) is a Python library for reading inputs and writing outputs of APEER modules. The ADK will take care of reading inputs from previous modules in APEER and writing your outputs in the correct format for the next module.
Installation
$ pip install apeer-dev-kit
How to Use
Your code (your_code.py) can be in it's seperate package and run totally independent of APEER if you use the following structure for __main__
.
#### apeer_main.py ####
from apeer_dev_kit import adk
import your_code
if __name__ == '__main__':
inputs = adk.get_inputs()
outputs = your_code.run(inputs['input_image_path'], inputs['red'], inputs['green'], inputs['blue'])
adk.set_output('success', outputs['success'])
adk.set_file_output('tinted_image', outputs['tinted_image'])
adk.finalize()
#### your_code.py #####
def run(input_image_path, red, green, blue):
# your processing code goes here ...
# Make sure you return the outputs as a dictionary containing all output
# values as specified for your APEER module
return {'success': True, 'tinted_image': output_file_path}
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
apeer-dev-kit-1.0.5.tar.gz
(2.7 kB
view hashes)
Built Distribution
Close
Hashes for apeer_dev_kit-1.0.5-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 844e74f9eeb5e647177ae7e5967be7770f7e11866348260896778cd3c3b6f791 |
|
MD5 | 8cc3fb82401e9510815084f1d3d6680c |
|
BLAKE2b-256 | 7d9ba5c5770f787a779c2c1d590b6bf173b11538d9977c872623d991f2680def |