Skip to main content

geni-bioinfo

PyPI version License: MIT Python 3.9+

Python client library for the GENI Workflows API — a bioinformatics platform for submitting and managing Nextflow workflow executions on cloud infrastructure.

Installation

pip install geni-bioinfo

Quick start

Authentication

Option 1 — email and password (JWT):

from geni import GeniClient

client = GeniClient()
client.auth_login("you@example.com", "your-password")

Option 2 — static API token:

from geni import GeniClient

client = GeniClient()
client.auth_token("your-api-token")

The API URL defaults to https://workflows-api.geni-bioinfo.com.br. Override it with the GENI_API_URL environment variable or the api_url constructor argument.

Core workflow

from geni import GeniClient

client = GeniClient()
client.auth_token("your-api-token")

# 1. Upload a workflow
wf = client.workflow_create(
    name="hello-world",
    version="1.0.0",
    file_path="hello.nf",
)
print(wf.name, wf.version)

# 2. Discover available engines and queues
engines = client.engine_list(status="active")
queues  = client.queue_list(status="active")

# 3. Submit the workflow
submission = client.submission_create(
    workflow_name="hello-world",
    engine_id=engines[0].id,
    queue_id=queues[0].id,
    output="s3://my-bucket/runs/hello-001",
    params_path="params.yml",
)
print(submission.submission_id, submission.status)

# 4. Poll status
sub = client.submission_get(submission.submission_id)
print(sub.status)

# 5. Stream logs
print(client.submission_logs(submission.submission_id, text=True))

Tagging

Tag keys live in one registry shared by workflows and submissions, and must be created first:

client.tag_create("client")
client.tag_create("project")

# Workflow tags apply to every version and are inherited by its submissions.
client.workflow_create(
    name="hello-world", version="1.0.0", file_path="hello.nf",
    tags={"client": "lab", "project": "x"},
)
client.workflow_update_tags(
    "hello-world",
    edit=[{"key": "client", "value": "acme"}],
    remove=["project"],
)
client.workflow_list(tags={"client": "acme"})

# A submission tag overrides the workflow's value for the same key.
client.submission_create(..., tags={"client": "other"})

Tags are copied onto the submission when it is created, so editing a workflow's tags later does not change submissions that already exist.

API reference

GeniClient

Method Description
auth_login(email, password) Authenticate with email + password (JWT)
auth_token(token) Authenticate with a static API key
user_list() List platform users (admin only)
environment_list(status) List cloud environments (admin only)
engine_list(status, environment_id, engine) List engines, optionally filtered by environment or engine type (nextflow/cromwell) (admin only)
queue_list(status, environment_id, execution_mode) List job queues, optionally filtered by environment or execution mode (spot/on-demand) (admin only)
storage_list(status) List cloud storage resources (admin only)
workflow_create(name, version, file_path, tags=..., ...) Upload and register a workflow version
workflow_list(tags=...) List all registered workflow versions, optionally filtered by tag
workflow_update_tags(name, add, edit, remove) Add, change, or remove tags on a workflow
submission_create(workflow_name, engine_id, queue_id, output, params_path, ...) Submit a workflow for execution
submission_list(status) List submissions
submission_get(id) Fetch a single submission by ID
submission_inputs(id, output_file=None) Download the original JSON/YAML inputs as bytes, optionally writing a file
submission_cancel(id) Cancel a running submission
task_list(submission_id) List tasks for a submission
task_logs(submission_id, task_id, text) Fetch task log entries
submission_logs(submission_id, text) Fetch submission-level Nextflow logs

Exceptions

Exception Raised when
GeniConfigError auth_login() or auth_token() was not called before a request
GeniAuthError Invalid credentials or insufficient permissions (HTTP 401/403)
GeniNotFoundError A resource ID does not exist (HTTP 404)
GeniAPIError Any other unexpected HTTP error; exposes .status_code, .method, .url, .response_body

Tutorial

An interactive Jupyter notebook is available in docs/tutorial.ipynb.

License

MIT — see LICENSE.

Metadata

Release files for geni-bioinfo 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for geni-bioinfo 0.1.5
File Size Uploaded Provenance Actions
geni_bioinfo-0.1.5.tar.gz 23.4 kB Without provenance Details for geni_bioinfo-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for geni-bioinfo 0.1.5
File Interpreter ABI Platform Actions
geni_bioinfo-0.1.5-py3-none-any.whl Python 3 none any Details for geni_bioinfo-0.1.5-py3-none-any.whl

Total release size: 43.7 kB

Release files / geni_bioinfo-0.1.5.tar.gz

Download URL geni_bioinfo-0.1.5.tar.gz
Size 23.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e289a606a50317859b30005b4176a14842dcfa23ee02f5c9fa8485576d444d9d
BLAKE2b-256 checksum
How to use checksums
1e85d869806734ac86e502c0299a4bbc6163cce9a8aee3d09d0c74f26bfa7fdf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release files / geni_bioinfo-0.1.5-py3-none-any.whl

Download URL geni_bioinfo-0.1.5-py3-none-any.whl
Size 20.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4630274bcbf9370cb31c45bf5703d6918ea7e7c3400e398bdca91bedb2794897
BLAKE2b-256 checksum
How to use checksums
016df25729890b923ed7358d1631d48e9c90bc215417b99800340fddd470ff7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Security for geni-bioinfo 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page