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.

Files for im-pysquonk, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size im_pysquonk-1.0.1-py3-none-any.whl (20.7 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page