(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 --dir cube/uploads'
--cmd_path_flags='--dir' --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 --dir cube/uploads'
--cmd_path_flags='--dir' --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-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 179804afab744c2820d627320f9548bae6e95300392204f5ad3813361b4a1557 |
|
MD5 | a27297568710713c2832a01319d60cea |
|
BLAKE2b-256 | 58823ed0faae65b377ab0088c3be0f9b29ce8b09eefd57dab47c0c08874ce559 |