Skip to main content

GWCloud Python API

GWCloud is a service used to handle both the submission of Bilby jobs to a supercomputer queue and the obtaining of the results produced by these jobs. While there is a web interface for this service, which is recommended for beginners, this package can be used to allow Bilby job submission and manipulation from Python scripts.

Check out the documentation for more information.

Installation

The gwcloud-python package can be installed with

pip install gwcloud-python

Example

>>> from gwcloud_python import GWCloud
>>> gwc = GWCloud(token='<user_api_token_here>')
>>> job = gwc.get_official_job_list()[0]
>>> job.save_corner_plot_files()

100%|██████████████████████████████████████| 3.76M/3.76M [00:00<00:00, 5.20MB/s]
All 2 files saved!

GWFlow

To upsert a GWFlow job record and upload its pending files:

from gwcloud_python import GWCloud

gwc = GWCloud(api_token="<your-token>", endpoint="<endpoint>")

# Upsert a job (idempotent — creates or updates by sname)
result = gwc.upsert_gwflow_job(
    sname="S230101a",
    metadata={"key": "value"},
    files=[{"path": "/frames/H1.gwf", "file_name": "H1.gwf", "analysis_uid": "uid-001"}],
)

# Upload each pending file
for pending_file in result.files_pending:
    gwc.upload_gwflow_file(pending_file.id, f"/local/path/{pending_file.file_name}")

To list GWFlow jobs, fetch a job by its super-name, and download one of its files:

from gwcloud_python import GWCloud

gwc = GWCloud(api_token="<your-token>", endpoint="<endpoint>")

jobs = gwc.get_gwflow_job_list(search="S230101a", time_range="all", include_pruned=False)
job = gwc.get_gwflow_job(sname="S230101a")
if job is not None and job.files:
    gwc.download_gwflow_file(job.files[0].download_token, "/local/path/file.h5")

Other GWFlow methods include:

  • get_gwflow_pending_files — get all GWFlow files that have not yet been mirrored.

  • link_bilby_job_to_gwflow — link a Bilby job to a GWFlow analysis.

See the GWFlow guide in the documentation for more details.

Metadata

Release files for gwcloud-python 2.1.0

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

Source distribution (sdist)

Source distribution for gwcloud-python 2.1.0
File Size Uploaded Provenance Actions
gwcloud_python-2.1.0.tar.gz 25.7 kB Without provenance Details for gwcloud_python-2.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gwcloud-python 2.1.0
File Interpreter ABI Platform Actions
gwcloud_python-2.1.0-py3-none-any.whl Python 3 none any Details for gwcloud_python-2.1.0-py3-none-any.whl

Total release size: 59.3 kB

Release files / gwcloud_python-2.1.0.tar.gz

Download URL gwcloud_python-2.1.0.tar.gz
Size 25.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3acec90f8d569d9d7fdd968bb0121f656e41fe10ab4b3bf2ce817b539b7d4d50
BLAKE2b-256 checksum
How to use checksums
c81ce298e1f9dade10b6d8d017e688f357d203268f344c98fb445688f994ae3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.12.3 Linux/7.0.0-3-pve

Release files / gwcloud_python-2.1.0-py3-none-any.whl

Download URL gwcloud_python-2.1.0-py3-none-any.whl
Size 33.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b35ccdb0119ea3803ead98b0d5fb2183114b639bdb7e29d1dda47081e892e717
BLAKE2b-256 checksum
How to use checksums
23446493ceb4c898cc29cea7ffb6bb4af53c9001dcb919e3d5e520f793355fc3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.12.3 Linux/7.0.0-3-pve

Security for gwcloud-python 2.1.0

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.

Release history Release notifications | RSS feed

This release

2.1.0 This release

2 release files No provenance

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