Skip to content

v2.1.0

Latest

Choose a tag to compare

@github-actions github-actions released this 24 Nov 14:12
69458a9

v2.1.0 adds time-limited, resource-scoped storage capability tokens to the FLAME Hub Python Client. These notes cover the changes since v2.0.0.

👀 Highlights

🔑 Request storage tokens with explicit permissions

You can now call CoreClient.mint_storage_cap_token() to request storage access for an analysis, choosing the resources, permitted actions and token lifetime. This lets you request a token scoped to specific storage operations, such as writing to an analysis result bucket.

The new public models in flame_hub.models describe the request and response:

  • StorageCapability: a bucket or bucket_file resource, its ID, and a list of read, write or delete actions.
  • StorageCapabilityTokenRequest: the capabilities and requested lifetime.
  • StorageCapabilityToken: the returned token and expires_at timestamp.

For example, adapted from the release's integration test, request write access to an existing analysis result bucket:

from flame_hub.models import StorageCapability, StorageCapabilityTokenRequest

# Use your configured CoreClient, existing analysis and result bucket,
# and ClientAuth for a node associated with that analysis.
token = core_client.mint_storage_cap_token(
    analysis_id=analysis.id,
    capability_request=StorageCapabilityTokenRequest(
        capabilities=[
            StorageCapability(
                resource_type="bucket",
                resource_id=analysis_result_bucket.bucket_id,
                actions=["write"],
            ),
        ],
        lifetime=60,
    ),
    auth=node_client_auth,
)

print(token.expires_at)

Note

Token issuance uses the Hub core API's analysis storage-token endpoint. The integration test authenticates as a node associated with the analysis; the client does not grant permissions independently of the Hub.

📖 Client API documentation

⬆️ Upgrading

python -m pip install --upgrade flame-hub-client==2.1.0

Python support remains >=3.10,<4.

👉 Changelog

2.1.0 (2026-11-24)

Features