Skip to main content

Python client for the gobbler service

Unit tests Documentation PyPI-Server

Pretty much as it says on the tin; provides an Python client for the Gobbler service. It is assumed that the users of this package and the Gobbler service itself are accessing the same shared filesystem; this is typically the case for high-performance computing (HPC) clusters in scientific institutions. To demonstrate, let's spin up a mock Gobbler instance:

import pygobbler as pyg
_, staging, registry, url = pyg.start_gobbler()

Administrators are responsible for creating projects:

pyg.create_project("test", staging=staging, url=url, owners=["akari"])

An authorized user account (in this case, akari) can then upload directory of arbitrary files:

import tempfile
import os
tmp = tempfile.mkdtemp()
with open(os.path.join(tmp, "blah.txt"), "w") as f:
    f.write("BAR")
os.mkdir(os.path.join(tmp, "foo"))
with open(os.path.join(tmp, "foo", "bar.txt"), "w") as f:
    f.write("1 2 3 4 5 6 7 8 9 10")

pyg.upload_directory(
    project="test", 
    asset="foo", 
    version="bar", 
    directory=tmp,
    staging=staging, 
    url=url
)

Anyone can fetch or list the contents, either on the same filesystem or remotely via the REST API.

pyg.list_files("test", "foo", "bar", registry=registry, url=url)
pyg.fetch_manifest("test", "foo", "bar", registry=registry, url=url)
pyg.fetch_summary("test", "foo", "bar", registry=registry, url=url)
pyg.fetch_file("test/foo/bar/blah.txt", registry=registry, url=url)
pyg.version_path("test", "foo", "bar", registry=registry, url=url)

Project owners can set the permissions to allow other users to add new assets or new versions of existing assets:

pyg.set_permissions(
    "test", 
    uploaders=[ { "id": "alicia", "asset": "foo" } ], 
    registry=registry, 
    staging=staging, 
    url=url
)

# And then 'alicia' can do:
pyg.upload_directory(
    project="test", 
    asset="foo", 
    version="bar2", 
    directory=tmp,
    staging=staging, 
    url=url
)

By default, uploaders are untrusted and their uploads will be "probational". Owners can approve/reject probational uploads after review.

pyg.approve_probation("test", "foo", "bar2", staging=staging, url=url)

Finally, administrators can delete projects, though this should be done sparingly.

pyg.remove_project("test", staging=staging, url=url)

Check out the API documentation for more details on each function. For the concepts underlying the Gobbler itself, check out the repository for a detailed explanation.

Metadata

Release files for pygobbler 0.1.11

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

Source distribution (sdist)

Source distribution for pygobbler 0.1.11
File Size Uploaded Provenance
pygobbler-0.1.11.tar.gz 39.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pygobbler 0.1.11
File Interpreter ABI Platform
pygobbler-0.1.11-py3-none-any.whl Python 3 none any Details

Total release size: 71.5 kB

Release files / pygobbler-0.1.11.tar.gz

Download URL pygobbler-0.1.11.tar.gz
Size 39.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b6d3a7175a16ffd70f1f7015e0230c1cd86d6008e31aa0d2ba6d0e8e5618a333
BLAKE2b-256 checksum
How to use checksums
86cec713745141ff3f743bfe445830f12723c4cbf1a5fb96aaf0169d2fe11e21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / pygobbler-0.1.11-py3-none-any.whl

Download URL pygobbler-0.1.11-py3-none-any.whl
Size 31.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fdcda09214bc182d3a03dd41bbca2976596fbbed7ce25d8ea93e1500dc62bb44
BLAKE2b-256 checksum
How to use checksums
0975d7eccfcdc77ce4c3082c5ceffa2d0575c9982a86ce7cbcd983ed0cc4013b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Security for pygobbler 0.1.11

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.

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