Skip to main content

Pysquonk rest server API

Project description

pysquonk

PySquonk

Pysquonk is a python API wrapper round the Informatics Matters Squonk Rest Services. It can be used to submit jobs, check their status and retreive the jobs results. It can be used in two ways:

  • from the command line
  • writing python scripts using the API

Installation

From github https://github.com/InformaticsMatters/pysquonk

From pip: pip install im-pysquonk

Running from the command line

Copy the file config.ini from github and save it into the directory you are going to run the command from. Edit your username and password into the file, or pass them via the command line (see below). The job to run is specified using yaml files. Examples of yaml files for various jobs are available in the yaml directory. For example, if you installed with pip, the command;

pysquonk -r yaml/pipelines.rdkit.sucos.o3da.yaml -o outdir

will run the job defined by the file pipelines.rdkit.sucos.o3da.yaml and write its output to the directory outdir. To get help run.

pysquonk -h

If you did install pysquonk via pip, but you have a directory SQUONKDIR containing the contents of the repository then the command would be:

python SQUONKDIR/squonk -h

If you want to run a job that does not have an example in the yaml directory, then the command:

pysquonk -s pipelines.rdkit.sucos.o3da -o outdir

will write out an example yaml file that you can amend to directory outdir

Using the Python API

The API documentation is in doc/squonk.md. There is an example program in test_harness.py

Development and Testing

To run all the test jobs in the yaml sub directory, from the top level of the repo run:

python test_jobs.py

(will prompt for username and password). -r option will run one of the jobs.

To run the script that executes the API functions:

python test_harness.py (will prompt for username and password).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

im_pysquonk-1.0.1-py3-none-any.whl (20.7 kB view details)

Uploaded Python 3

File details

Details for the file im_pysquonk-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: im_pysquonk-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 20.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.6.8

File hashes

Hashes for im_pysquonk-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3c9199e6fd2e5c8b99ee44757cc263ff46b5c014a381c08f4abf0a57efa4742f
MD5 23f80a8599940568db1de0da142c0553
BLAKE2b-256 ad37561baf359aefa0d115c4034403a27aaa9111be6b2f5000f2fa5aa0fd682c

See more details on using hashes here.

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