From 55b1dd8aafec76382669fea42cf4e36882f27d20 Mon Sep 17 00:00:00 2001 From: Josef Prochazka Date: Mon, 16 Feb 2026 11:09:45 +0100 Subject: [PATCH] Update docs about alias storages to match the implementation --- docs/guides/code_examples/storages/opening.py | 3 +-- docs/guides/storages.mdx | 2 +- src/crawlee/storages/_storage_instance_manager.py | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/guides/code_examples/storages/opening.py b/docs/guides/code_examples/storages/opening.py index 0e72d574a2..3ce77d7a67 100644 --- a/docs/guides/code_examples/storages/opening.py +++ b/docs/guides/code_examples/storages/opening.py @@ -10,9 +10,8 @@ async def main() -> None: # Unnamed storage with alias (purged on start) dataset_unnamed = await Dataset.open(alias='temporary-results') - # Default unnamed storage (both are equivalent and purged on start) + # Default unnamed storage (purged on start) dataset_default = await Dataset.open() - dataset_default = await Dataset.open(alias='default') if __name__ == '__main__': diff --git a/docs/guides/storages.mdx b/docs/guides/storages.mdx index 076b54647b..ff38ecba26 100644 --- a/docs/guides/storages.mdx +++ b/docs/guides/storages.mdx @@ -83,7 +83,7 @@ Crawlee supports two types of storages: ### Default storage -Each storage type (`Dataset`, `KeyValueStore`, `RequestQueue`) has a default instance that can be accessed without specifying `id`, `name` or `alias`. Default unnamed storage is accessed by calling storage's `open` method without parameters. This is the most common way to use storages in simple crawlers. The special alias `"default"` is equivalent to calling `open` without parameters +Each storage type (`Dataset`, `KeyValueStore`, `RequestQueue`) has a default instance that can be accessed without specifying `id`, `name` or `alias`. Default unnamed storage is accessed by calling storage's `open` method without parameters. This is the most common way to use storages in simple crawlers. {OpeningExample} diff --git a/src/crawlee/storages/_storage_instance_manager.py b/src/crawlee/storages/_storage_instance_manager.py index 91aa4621f3..00f588122c 100644 --- a/src/crawlee/storages/_storage_instance_manager.py +++ b/src/crawlee/storages/_storage_instance_manager.py @@ -117,8 +117,7 @@ async def open_storage_instance( # Validate input parameters. raise_if_too_many_kwargs(id=id, name=name, alias=alias) - # Auto-set alias='default' when no parameters are specified. - # Default unnamed storage is equal to alias=default unnamed storage. + # Auto-set alias='__default__' when no parameters are specified. if not any([name, alias, id]): alias = self._DEFAULT_STORAGE_ALIAS