Skip to main content

A CLI and Python library to interact with Azulene Opal

Project description

opal-cli

How to download OPAL CLI

pip install azulene-opal

CLI Commands (macOS, Linux, Windows)

# Auth
python -m opal.main login --email user@example.com --password pass123
python -m opal.main whoami
python -m opal.main logout

# Jobs
python -m opal.main jobs submit --job-type xtb_calculation --input-data '{"numbers":[1,1], "positions":[[0,0,0],[0.74,0,0]]}'
python -m opal.main jobs cancel --job-id abc123
python -m opal.main jobs get --job-id abc123
python -m opal.main jobs get-jobs
python -m opal.main jobs check-running-jobs
python -m opal.main jobs get-job-types
python -m opal.main jobs check-health

Help Commands

python -m opal.main --help

python -m opal.main jobs --help

python -m opal.main jobs submit --help

Auth Commands

# Log in
python -m opal.main login --email your@email.com --password yourpassword

# Who am I (get current user info)
python -m opal.main whoami

# Log out
python -m opal.main logout

Job Commands

# Submit a job (CMD)
python -m opal.main jobs submit --job-type generate_conformers --input-data "{\"smiles\": \"CCO\", \"num_conformers\": 5}"

# Submit a job (Git Bash / WSL / Linux / macOS)
python -m opal.main jobs submit --job-type generate_conformers --input-data '{"smiles": "CCO", "num_conformers": 5}'

# Submit a job (Powershell)
python -m opal.main jobs submit --job-type generate_conformers --input-data '{\"smiles\": \"CCO\", \"num_conformers\": 5}'

# List all jobs
python -m opal.main jobs get-jobs

# Get a specific job by ID
python -m opal.main jobs get --job-id YOUR_JOB_ID

# Cancel a job by ID
python -m opal.main jobs cancel --job-id YOUR_JOB_ID

# Poll modal for job status/results
python -m opal.main jobs check-running-jobs

# Health check
python -m opal.main jobs check-health

# Get available job types 
python -m opal.main jobs get-job-types

Examples of Using the Library in Python

from opal import auth, jobs

# 1. Log in
auth.login(email="test@example.com", password="pass123")

# 2. Who am I
print(auth.whoami())

# 3. Submit a job
jobs.submit(job_type="generate_conformers",input_data={"smiles": "CCO", "num_conformers": 5}) # dict
# jobs.submit(job_type="generate_conformers",input_data='{"smiles": "CCO", "num_conformers": 5}') # str

# 4. List all jobs
print(jobs.get_jobs())

# 5. Get a specific job
print(jobs.get(job_id="YOUR_JOB_ID"))

# 6. Cancel a job
print(jobs.cancel(job_id="YOUR_JOB_ID"))

# 7. Poll job statuses
jobs.poll()

# 8. Health check
print(jobs.check_health())

# 9. Get job types
print(jobs.get_job_types())

# 10. Log out
auth.logout()

Tips

  • Wrap JSON input in single quotes ('{"key": "value"}') and escape double quotes on Windows if needed.
  • Replace YOUR_JOB_ID with actual returned IDs from list-all or submit.

All Rights Reserved

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

azulene_opal-0.3.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

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

azulene_opal-0.3.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file azulene_opal-0.3.0.tar.gz.

File metadata

  • Download URL: azulene_opal-0.3.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for azulene_opal-0.3.0.tar.gz
Algorithm Hash digest
SHA256 1b6872465c78b5605bb1291af6e2b1f3ed774eaa9b5c3f7adeabf4458541fcc3
MD5 5f10e5241c2417ad4967860937d90a83
BLAKE2b-256 418b29bc4d14ac3f0fc074e122c97924292bc6cc56dc30e87f7667e3c19b825e

See more details on using hashes here.

File details

Details for the file azulene_opal-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: azulene_opal-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for azulene_opal-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 08c51fdeaa7a0be2a6a50cb16bc610b7020b6873d730ef05e84d52e862330c08
MD5 01712a3d8b3bfc98ef6f23c3f9eb2ba5
BLAKE2b-256 3498cf7c72efc052f9872cdf215b69315f804b68f803da3f849092ba2d4769cd

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