Skip to main content

(Python) client for the Pfcon API

Project description

A python client for the (flask-based) pfcon API.

https://travis-ci.org/FNNDSC/python-pfconclient.svg?branch=master

Installation

pip install -U python-pfconclient

Usage

For the run subcommand

Run fs plugin until finished and get the resulting files in a local directory:

pfconclient http://localhost:5006/api/v1/ chris-jid-1 run --cmd_args '--saveinputmeta --saveoutputmeta path:--dir cube/uploads'
--auid cube --number_of_workers 1 --cpu_limit 1000 --memory_limit 200 --gpu_limit 0 --image fnndsc/pl-simplefsapp
--selfexec simplefsapp.py --selfpath /usr/src/simplefsapp --execshell python3 --type fs /tmp/sbin/in /tmp/sbin/out/chris-jid-1

Run ds plugin until finished and get the resulting files in a local directory:

pfconclient http://localhost:5006/api/v1/ chris-jid-2 run --cmd_args '--saveinputmeta --saveoutputmeta --prefix lolo'
--auid cube --number_of_workers 1 --cpu_limit 1000 --memory_limit 200 --gpu_limit 0 --image fnndsc/pl-simpledsapp
--selfexec simpledsapp.py --selfpath /usr/src/simpledsapp --execshell python3 --type ds /tmp/sbin/in /tmp/sbin/out/chris-jid-2

For the submit subcommand

Submit fs plugin for execution:

pfconclient http://localhost:5006/api/v1/ chris-jid-3 submit --cmd_args '--saveinputmeta --saveoutputmeta path:--dir cube/uploads'
--auid cube --number_of_workers 1 --cpu_limit 1000 --memory_limit 200 --gpu_limit 0 --image fnndsc/pl-simplefsapp
--selfexec simplefsapp.py --selfpath /usr/src/simplefsapp --execshell python3 --type fs /tmp/sbin/in

Submit ds plugin for execution:

pfconclient http://localhost:5006/api/v1/ chris-jid-4 submit --cmd_args '--saveinputmeta --saveoutputmeta --prefix lolo'
--auid cube --number_of_workers 1 --cpu_limit 1000 --memory_limit 200 --gpu_limit 0 --image fnndsc/pl-simpledsapp
--selfexec simpledsapp.py --selfpath /usr/src/simpledsapp --execshell python3 --type ds /tmp/sbin/in

For the poll subcommand

Keep polling for the execution status of a previously submitted plugin until it finishes:

pfconclient http://localhost:5006/api/v1/ chris-jid-3 poll

For the status subcommand

Perform a single check of the execution status of a previously submitted plugin:

pfconclient http://localhost:5006/api/v1/ chris-jid-4 status

For the download subcommand

Download the output files of a previously submitted plugin that has already finished:

pfconclient http://localhost:5006/api/v1/ chris-jid-4 download /tmp/sbin/out/chris-jid-4

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

python-pfconclient-0.1.0.tar.gz (5.9 kB view hashes)

Uploaded Source

Built Distribution

python_pfconclient-0.1.0-py3-none-any.whl (7.0 kB view hashes)

Uploaded Python 3

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