{"id":6223,"library":"robocorp-storage","title":"Robocorp Asset Storage","description":"robocorp-storage is the Robocorp Asset Storage library, providing functions to manage (read, write, list) assets in the Robocorp Control Room or local development environment. It is part of the larger Robocorp ecosystem, typically updated alongside other Robocorp libraries, with a focus on stability for its core asset management API. The current version is 1.1.0.","status":"active","version":"1.1.0","language":"en","source_language":"en","source_url":"https://github.com/robocorp/robocorp/","tags":["robocorp","automation","RPA","storage","assets","cloud"],"install":[{"cmd":"pip install robocorp-storage","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Internal dependency for core RPA functionalities.","package":"rpaframework-core","optional":false},{"reason":"Internal dependency for Robocorp application context.","package":"robocorp-app","optional":false}],"imports":[{"symbol":"get_asset","correct":"from robocorp.storage import get_asset"},{"symbol":"set_asset","correct":"from robocorp.storage import set_asset"},{"symbol":"find_assets","correct":"from robocorp.storage import find_assets"},{"note":"Used for type hinting and accessing asset properties.","symbol":"Asset","correct":"from robocorp.storage import Asset"}],"quickstart":{"code":"from robocorp.storage import get_asset, set_asset\nimport os\n\n# Assets stored via robocorp-storage are persisted in Robocorp Control Room\n# when run in a robot, or in a local temporary directory otherwise.\n\nasset_name = \"my-robot-state\"\nasset_value = \"Current processing step: Data extraction complete.\"\n\nprint(f\"Setting asset '{asset_name}'...\")\n# Assets are typically stored as bytes, hence the .encode()\nset_asset(asset_name, asset_value.encode(\"utf-8\"), \"text/plain\")\nprint(f\"Asset '{asset_name}' stored.\")\n\nprint(f\"Retrieving asset '{asset_name}'...\")\nasset = get_asset(asset_name)\n\nif asset:\n    retrieved_value = asset.get_bytes().decode(\"utf-8\")\n    print(f\"Successfully retrieved asset: '{retrieved_value}'\")\n    assert retrieved_value == asset_value\nelse:\n    print(f\"Asset '{asset_name}' not found.\")\n\n# Example of clearing assets (useful for local development cleanup)\n# from robocorp.storage import clear_assets_from_disk\n# if os.environ.get(\"RC_API_SECRET\") is None: # Only clear if running locally, not in Control Room\n#    clear_assets_from_disk()","lang":"python","description":"This quickstart demonstrates how to set and retrieve a simple text asset. When run locally, assets are stored in a temporary directory. When executed within a Robocorp Control Room robot, assets are securely stored in the cloud. The optional cleanup code is commented out as it's typically for local development."},"warnings":[{"fix":"Ensure your robot runs within the Robocorp Control Room for cloud persistence. For local testing, be aware that assets are ephemeral by default. To debug local persistence issues, check the temporary directory used by the library.","message":"Asset persistence is context-dependent. When `robocorp-storage` is used outside of a Robocorp Control Room robot run (e.g., local development), assets are stored in a temporary directory and are not automatically synced to the cloud or persisted across process restarts unless explicitly configured.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Evaluate your data storage needs: use `robocorp-storage` for configuration, small files, or state; use `robocorp-workitems` for larger datasets, inputs, or outputs of processing steps.","message":"This library is designed for managing 'assets' (relatively small pieces of data or configuration files). For handling large datasets or multiple related files that form an input/output of a task, consider using `robocorp-workitems`.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Migrate any custom asset logic to use the `robocorp.storage` API for better compatibility, maintainability, and direct integration with the Control Room's asset features.","message":"Older projects might have custom asset management solutions or rely on `rpaframework`'s `Vault` for some functionalities. `robocorp-storage` provides the official and recommended way to interact with Robocorp's Asset Storage.","severity":"deprecated","affected_versions":"< 1.0.0"}],"env_vars":null,"last_verified":"2026-04-14T00:00:00.000Z","next_check":"2026-07-13T00:00:00.000Z","problems":[]}