class neuroglancer.json_wrappers.Map[KV]

Maps keys of type K to values of type V.

Type Parameters:
K

Key type.

V

Mapped value type.

Public members

Map(json_data=None_readonly=False)

Initialize self. See help(type(self)) for accurate signature.

clear()

Clears the map.

keys(-> KeysView[K]

Returns a dynamic view of the keys in the map.

values(-> ValuesView[V]

Returns a dynamic view of the values in the map.

items(-> ItemsView[K, V]

Returns a dynamic view of the items in the map.

get(key: K-> V | None
get(key: Kdefault: V-> V
get[T](key: Kdefault: T-> V | T

Returns the mapped value, or the specified default.

__len__(-> int

Returns the number of entries in the map.

__getitem__(key: K-> V

Returns the mapped value associated with the specified key.

__setitem__(key: Kvalue: V)

Sets the specified key to the specified value.

__delitem__(key: K)

Deletes the entry with the specified key.

pop(key: K/-> V
pop(key: Kdefault: V/-> V
pop[T](key: Kdefault: T/-> V | T

Removes and returns the mapped value associated with the specified key.

to_json()
__eq__(other)

Return self==value.

__repr__()

Return repr(self).