◐ Shell
reader mode source ↗
Skip to main content
Version: 1.7
On this page

UseStateFunction

A function for managing state within the crawling context.

It allows the use of persistent state across multiple crawls.

Index

Methods

Methods

__call__

  • __call__(default_value): Coroutine[None, None, MutableMapping[str, JsonSerializable]]
  • Call dunder method.


    Parameters

    • optionaldefault_value: MutableMapping[str, JsonSerializable] | None = None

      The default value to initialize the state if it is not already set.

    Returns Coroutine[None, None, MutableMapping[str, JsonSerializable]]

    The current state.

Page Options