Skip to main content
Use the asset APIs outside a flow, such as in admin scripts, CI cleanup jobs, or notebooks. Use Asset directly outside flow context (deployments, notebooks, scripts):
When read_only=True:
  • Registration methods are no-ops
  • Consume methods use GET (no lineage tracking) instead of PUT
  • Delete methods raise RuntimeError
For writes from a standalone script (register, consume, delete), pass an explicit entity_ref—current.pathspec isn’t available outside a flow.

Cleanup scripts

Writable standalone clients are the right path for admin or CI cleanup. The script constructs an Asset with an explicit user-entity ref, then loops over names to delete:
Each call removes the asset from both the catalog and the flowproject metadata. DeleteResult lets the script render meaningful progress (for example, already absent vs metadata only (catalog already absent) vs deleted (catalog+metadata)). Reruns are safe—names that are already gone return DeleteResult(False, False).