Skip to main content

Development kit for creating modules on apeer

Project description

APEER Python SDK

Build Status Python 2.7 Python 3.6 PyPI Version License

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


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.6.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

apeer_dev_kit-1.0.6-py2-none-any.whl (4.4 kB view hashes)

Uploaded Python 2

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