Registry /
data / snakemake-interface-storage-plugins
Install & Compatibility
Where this runs
tested against v4.4.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 0.271s · 20.5MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 2.3s · import 0.234s · 21MB
18MB installed
● package 18MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
StorageProviderBase
✓ from snakemake_interface_storage_plugins.storage_provider import StorageProviderBase
StorageObject
✓ from snakemake_interface_storage_plugins.storage_object import StorageObject
StorageProviderSettingsBase
✓ from snakemake_interface_storage_plugins.settings import StorageProviderSettingsBase
StoragePlugin
✓ from snakemake_interface_storage_plugins.registry import StoragePlugin
✗ from snakemake_interface_storage_plugins.plugin import StoragePlugin
The StoragePlugin class for registering plugins was moved to the 'registry' submodule.
This quickstart demonstrates the core components required to implement a minimal Snakemake storage plugin. You need to define a `StorageObject` (representing a file/directory on your custom storage) and a `StorageProviderBase` (which provides `StorageObject` instances). Finally, register your plugin using `StoragePlugin` to make it discoverable by Snakemake.
from snakemake_interface_storage_plugins.storage_object import StorageObject
from snakemake_interface_storage_plugins.storage_provider import StorageProviderBase
from snakemake_interface_storage_plugins.registry import StoragePlugin
from typing import Optional
# 1. Define your custom StorageObject, implementing required methods
class MyMinimalStorageObject(StorageObject):
def exists(self) -> bool:
# Placeholder: In a real plugin, check if the remote object exists.
return True
def mtime(self) -> float: return 0.0 # Last modified time
def size(self) -> int: return 0 # Size in bytes
def download_obj(self) -> None: pass # Download object to local path
def upload_obj(self) -> None: pass # Upload local object to remote
def list_local_files(self) -> list[str]: return [] # List files in local path
def cleanup(self) -> None: pass # Cleanup temporary files
# 2. Define your custom StorageProvider
class MyMinimalStorageProvider(StorageProviderBase):
def get_storage_object(self, url: str) -> StorageObject:
# Return an instance of your custom StorageObject for the given URL.
# 'query' and 'protocol' are typically parsed from the URL.
return MyMinimalStorageObject(query=None, protocol=self.name, path=url)
def example_path(self, protocol: Optional[str] = None) -> str:
# Provide an example path for your protocol (e.g., for documentation).
return f"{self.name}://path/to/file.txt"
@property
def name(self) -> str:
# The unique name for your storage protocol (e.g., 's3', 'gcs', 'my-minimal').
return "my-minimal"
# 3. Register your plugin with Snakemake
# This makes your plugin discoverable by Snakemake when it parses Snakefiles.
StoragePlugin(
name="my-minimal",
storage_provider=MyMinimalStorageProvider,
# settings_cls=None # Optionally register a custom settings class
)
print("Minimal Snakemake storage plugin 'my-minimal' defined and registered.")
# To make this plugin active for Snakemake, save this code in a Python file
# (e.g., my_storage_plugin.py) and ensure it's on your PYTHONPATH or installed
# as part of a Snakemake extension package.
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'humanfriendly'
The `humanfriendly` package, used internally by the storage plugin interface, was not installed as a direct dependency in versions prior to v4.3.3.
fixInstall the missing dependency: `pip install humanfriendly`. Alternatively, upgrade to `snakemake-interface-storage-plugins>=4.3.3` which includes `humanfriendly` as a direct dependency.
TypeError: Can't instantiate abstract class MyCustomStorageObject with abstract methods exists, mtime, size, download_obj, upload_obj, list_local_files, cleanup
Your custom `StorageObject` class inherits from `snakemake_interface_storage_plugins.storage_object.StorageObject` but has not implemented all of its required abstract methods.
fixEnsure that your `MyCustomStorageObject` class (and any custom `IOCacheInterface` if used) implements all abstract methods defined in the `StorageObject` base class. You must provide concrete implementations for `exists`, `mtime`, `size`, `download_obj`, `upload_obj`, `list_local_files`, and `cleanup`.
TypeError: __init__() missing 1 required positional argument: 'checksum'
You are trying to instantiate `StorageObject` or `IOCacheInterface` (or a custom class inheriting from them) without providing the `checksum` argument, which became required from v4.4.0 onwards for full functionality.
fixUpdate your code to provide a `checksum` argument when initializing `StorageObject` or `IOCacheInterface` instances, or ensure your custom plugin adheres to the updated interface. For example: `MyStorageObject(query=None, protocol='my', path=url, checksum=None)` (if checksum is optional for your specific case, otherwise provide a valid checksum value).
Upgrade
Version history
4.4.1latest on PyPI · released Mar 16, 2026
Audit
Dependencies
humanfriendlyrequiredUsed for human-readable file sizes and other utilities within the interface. It became a direct dependency from v4.3.3 onwards.