OpenDAL Driver
jumpstarter-driver-opendal provides functionality for interacting with
storages attached to the exporter.
Installation
:substitutions:
$ pip3 install --extra-index-url {{index_url}} jumpstarter-driver-opendal
Configuration
Example configuration:
:language: yaml
Configuration Parameters
scheme(required): The storage service type (e.g., "fs", "s3", "gcs"). See OpenDAL services for supported options.kwargs(required): Service-specific configuration parameters passed to the OpenDAL operator.remove_created_on_close(optional, default:false): When enabled, automatically removes all files and directories created during the session when the driver is closed.
File/Directory Tracking and Cleanup
The OpenDAL driver tracks all files and directories created during a session:
- File Creation: Files opened in write modes (
"wb","w","ab","a") - Directory Creation: Directories created via
create_dir() - Copy Operations: Target files/directories from
copy()operations - Rename Operations: Target files/directories from
rename()operations (source is removed from tracking)
Automatic Cleanup: The tracking is automatically updated when resources are removed:
- Delete Operations:
delete()removes the path from tracking - Remove Operations:
remove_all()removes the path from tracking
Cleanup Behavior: When remove_created_on_close: true, all tracked files and directories are automatically removed when the driver closes (filesystem only)
Tracking API
# Get all created resources (files and directories)
created_resources = await driver.get_created_resources() # Returns set[str]
# Example usage
for path in created_resources:
print(f"Created: {path}")
Use Cases
Temporary File Management:
# Enable cleanup for temporary storage
remove_created_on_close: true
Persistent Storage:
# Disable cleanup to preserve files (default)
remove_created_on_close: false
Note: Pre-existing files that are written to are treated as "created" since they may be remnants from failed cleanup operations.
API Reference
Examples
>>> from tempfile import NamedTemporaryFile
>>> opendal.create_dir("test/directory/")
>>> opendal.write_bytes("test/directory/file", b"hello")
>>> assert opendal.hash("test/directory/file", "md5") == "5d41402abc4b2a76b9719d911017c592"
>>> opendal.remove_all("test/")
from jumpstarter.config.exporter import ExporterConfigV1Alpha1DriverInstance
from jumpstarter.common.utils import serve
instance = serve(
ExporterConfigV1Alpha1DriverInstance.from_path("source/reference/package-apis/drivers/opendal.yaml"
).instantiate())
opendal = instance.__enter__()
instance.__exit__(None, None, None)
Client API
.. autoclass:: jumpstarter_driver_opendal.client.OpendalClient()
:members:
.. autoclass:: jumpstarter_driver_opendal.client.OpendalFile()
:members:
.. autoclass:: jumpstarter_driver_opendal.common.Metadata()
:members:
:undoc-members:
:exclude-members: model_config
.. autoclass:: jumpstarter_driver_opendal.common.EntryMode()
:members:
:undoc-members:
:exclude-members: model_config
.. autoclass:: jumpstarter_driver_opendal.common.PresignedRequest()
:members:
:undoc-members:
:exclude-members: model_config
.. autoclass:: jumpstarter_driver_opendal.common.Capability()
:members:
:undoc-members:
:exclude-members: model_config
Metadata
Release files for jumpstarter-driver-opendal 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jumpstarter_driver_opendal-0.9.0.tar.gz | 18.2 kB | Without provenance | Details for jumpstarter_driver_opendal-0.9.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jumpstarter_driver_opendal-0.9.0-py3-none-any.whl | Python 3 | none | any | Details for jumpstarter_driver_opendal-0.9.0-py3-none-any.whl |
Total release size: 38.5 kB
Release files / jumpstarter_driver_opendal-0.9.0.tar.gz
| Download URL | jumpstarter_driver_opendal-0.9.0.tar.gz |
|---|---|
| Size | 18.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8edca0311845a6aa547b793ccc6164639047d768bef440e35369ae5c9636549c
|
|
BLAKE2b-256 checksum How to use checksums |
a748ba10119ce4dda62f4569f6991c4d90ad85777fb781776c49c6b62033eb36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.22
|
Release files / jumpstarter_driver_opendal-0.9.0-py3-none-any.whl
| Download URL | jumpstarter_driver_opendal-0.9.0-py3-none-any.whl |
|---|---|
| Size | 20.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0ef3aa5269b0dba860f1635f968fb11384139110e40232312cd7b3ee6f444d43
|
|
BLAKE2b-256 checksum How to use checksums |
9fa85a3d3d1d486445c49f5a7282aba9af1fc7472b6dabe58fdf3d999b927ed2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.22
|
Security for jumpstarter-driver-opendal 0.9.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.