A CLI and Python library to interact with Azulene Opal
Project description
opal-cli
Examples of CLI Usage
opal signup --email user@example.com --password secret123
opal login --email user@example.com --password secret123
opal whoami
opal logout
# Jobs
opal jobs submit --job-type xtb_calculation --input-data '{"numbers":[1,1], "positions":[[0,0,0],[0.74,0,0]]}'
opal jobs cancel --job-id abc123
opal jobs get --job-id abc123
opal jobs list-all
opal jobs poll
opal jobs get-job-types
opal jobs get-job-types2
opal jobs health
Examples of Library Usage
from opal import auth, jobs
auth.login(email="test@example.com", password="password123")
jobs.submit_job("generate_conformers", {"smiles": "CCO", "num_conformers": 5})
Install locally:
pip install -e .
where opal
pip show opal-cli
Run locally:
python -m opal.main login --email test@example.com --password yourpassword
CLI Examples
Help Commands
python -m opal.main --help
python -m opal.main jobs --help
python -m opal.main signup --help
python -m opal.main jobs submit --help
Auth Commands
# Sign up a new user
python -m opal.main signup --email your@email.com --password yourpassword
# 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 list-all
# 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 poll
# Health check
python -m opal.main jobs health
# Get available job types (from Supabase Storage)
python -m opal.main jobs get-job-types
# Get available job types (from function variable)
python -m opal.main jobs get-job-types2
Tips
- Wrap JSON input in single quotes (
'{"key": "value"}') and escape double quotes on Windows if needed. - Replace
YOUR_JOB_IDwith actual returned IDs fromlist-allorsubmit.
How to deploy to PyPI (TestPyPI)
pip install build
python -m build
pip install twine
python -m twine upload dist/*
# remove the folder `dist` first:
rm -rf dist/ build/ *.egg-info
# rebuild the package
python -m build
python -m twine upload dist/*
Project details
Release history Release notifications | RSS feed
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.2.0.tar.gz
(6.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file azulene_opal-0.2.0.tar.gz.
File metadata
- Download URL: azulene_opal-0.2.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9eba3623fa4b380380bef1274f7dbff544dec4e676d8c4b30ba4ed4ad70585f4
|
|
| MD5 |
2f717e5eb122a5ec7aa6ef887bb9ce08
|
|
| BLAKE2b-256 |
098daff39702a2fd5d66592d8bcbeebc09da0d3d619176b5b09e5fa0e8f3e378
|
File details
Details for the file azulene_opal-0.2.0-py3-none-any.whl.
File metadata
- Download URL: azulene_opal-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d279d144014eaa5a02247e74b4b216e08c4e109937af99655b6645a66988e14d
|
|
| MD5 |
87cc02b907a69dc4f8543abb65878a6b
|
|
| BLAKE2b-256 |
5688d906652f91b30036952b6c9e9c66645faa3901208edf4b7521de0735eb5e
|