Skip to content

algopy_testing.state.local_map

LocalMapLocalMap abstracts the reading and writing of a set of local state values using a

Bases: Generic[_TKey, _TValue]

LocalMap abstracts the reading and writing of a set of local state values using a common key and content type, associated with a specific account.

Adequate space must be allocated for the application on creation (see algopy.StateTotals).

Provides access to the raw storage key-prefix.

get(account: algopy.Account | algopy.UInt64 | int, key: _TKey, default: _TValue) → _TValue

Section titled “get(account: algopy.Account | algopy.UInt64 | int, key: _TKey, default: _TValue) → _TValue”

maybe(account: algopy.Account | algopy.UInt64 | int, key: _TKey) → tuple[_TValue, bool]

Section titled “maybe(account: algopy.Account | algopy.UInt64 | int, key: _TKey) → tuple[_TValue, bool]”