(Python) client for the Pfcon API
Project description
A python client for the (flask-based) pfcon API.
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
Built Distribution
Close
Hashes for python_pfconclient-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49ff08252344603a8ba6fcfdc8207e1298b7eb51527fc9ec97764414db38da37 |
|
MD5 | ec884131d6687322d576fc0888b747e9 |
|
BLAKE2b-256 | a1b18edfe7570545f26a523bff6b05d07877961423c415e38f64e05b069f9cd7 |