Skip to main content

A set of tools to run nanohub web apis

Project description

Nanohub remote

Stats

Latest Release
PyPI Downloads
Nanohub Tutorial
A set of tools/apps to run on nanohub

Installation

pip install nanohub-remote

Usage

import nanohubremote as nr
auth_data = {
  'client_id': XXXXXXXX,
  'client_secret': XXXXXXXX,
  'grant_type': 'password',
  'username': XXXXXXXX,
  'password': XXXXXXXX
}

# to get username and password, register on nanohub.org (https://nanohub.org/register/)
# to get client id and secret, create a web application (https://nanohub.org/developer/api/applications/new), use "https://127.0.0.1" as Redirect URL

session = nr.Session(auth_data)

Available Nanohub Points

Tools

TOOLNAME = '' # valid Nanoohub tool name e.g. pntoy
tool = nr.Tool(auth_data)

# Get Available input parameters
params = tool.getToolParameters(TOOLNAME)

# Submit a simulation experiment
job_id = tool.submitTool(params)

# Check Status
status = tool.checkStatus(job_id['job_id'])

# Get Results
results = tool.getResults(job_id['job_id'])

# Submit an wait for results
results = tool.submitTool(params, wait_results=True)

Sim2Ls

TOOLNAME = '' # valid Nanoohub tool name e.g. pntoy
s2l = nr.Sim2L(auth_data)

# Get Available input parameters
params = s2l.getToolParameters(TOOLNAME)

# Submit a simulation experiment
job_id = s2l.submitTool(params)

# Check Status
status = s2l.checkStatus(job_id['job_id'])

# Get Results
results = s2l.getResults(job_id['job_id'])

# Submit an wait for results
results = s2l.submitTool(params, wait_results=True)

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.

nanohub_remote-0.1.4-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

Details for the file nanohub_remote-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: nanohub_remote-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 19.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for nanohub_remote-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 58986cc9abf20afcbf42f51c8ebdbe02e7c835d3a1db63bbecfcba0a759a517e
MD5 fbed190bf2cb494ee4014b4c1e3ae7dd
BLAKE2b-256 99068c9d3f5acd6edac2fc4b895631e1292d8f6ad777d0e52044842bb19019d8

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