Skip to main content

Python client for NEOS Server

Project description

NEOS Client

This is a Neos Client for NEOS Server: XML-RPC api. While the official client only provides a queue or submit job call, this client supports the following methods:

  • is_alive(): Equivalent to sending a ping to the server and checking the result.
  • get_job_status(job_number, job_password): Equivalent to getJobStatus(jobNumber, password) in NEOS Server RPC.
  • get_completion_code(job_number, job_password): Equivalent to getCompletionCode(jobNumber, password) in NEOS Server RPC.
  • get_job_info(job_number, job_password): Equivalent to getJobInfo(jobNumber, password) in NEOS Server RPC.
  • kill_job(job_number, job_password, message): Equivalent to killJob(jobNumber, password, killmsg="") in NEOS Server RPC.
  • get_final_results(job_number, job_password, is_blocking): Equivalent to getFinalResults(jobNumber, password) if it's blocking. If it's not blocking, it Equivalent to getFinalResultsNonBlocking(jobNumber, password).
  • email_job_results(job_number, job_password): Equivalent to emailJobResults(jobNumber, password) in NEOS Server RPC.
  • get_intermediate_results(job_number, job_password, offset, is_blocking): Equivalent to getIntermediateResults(jobNumber, password, offset) if it's blocking. If it's not blocking, it Equivalent to getIntermediateResultsNonBlocking(jobNumber, password).
  • download_output(job_number, job_password, working_directory): Downloads the results and extracts the files to the given working directory. It Equivalent to getOutputFile(job_number, job_password) in NEOS Server RPC and extracting it to the working directory.
  • print_queue(): Prints the current queue on the server if the server is alive.
  • submit_job(xml_path, is_blocking, working_directory): If the username and password is given, it is equivalent to authenticatedSubmitJob(xmlstring, user, password). If the username or password is not given, it is equivalent to submitJob(xml_string). If it's blocking, it waits until all the results are received. If it's non-blocking, it immediately returns after submitting the job.

Installation

pip install neos_client

or

git clone git@github.com:mabdullahsoyturk/neos_client.git
cd neos_client
pip install .

Usage

from neos_client import NeosClient

client = NeosClient(email=<your_email_address>)
client.submit_job(xml_path=<path_to_your_xml_file>)

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

If you're not sure about the file name format, learn more about wheel file names.

neos_client-0.0.1-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file neos_client-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: neos_client-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for neos_client-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fcb69409f866021794ab0df31ae795260b77f0e04206b5ce9478ca81f5056f65
MD5 2d31ad5a21cfbdacd47252cdc3f1cfd7
BLAKE2b-256 eb29e3e7d8725e42d58f8369a2de8eda28a7941e9c55d5f02f1c65ca46ee9f49

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page