SealSkin

PeerStore

The FileStore of another node, reached over the peer channel.

Functions

constructor__init__(call) -> None

Bind the store to a peer.

paramcallCallable[..., httpx.Response]

call(method, path, headers=None, content=b""), which signs and sends a request to the node that keeps the store.

Returns

None
func_send(method, key, headers=None, body=b'') -> httpx.Response

Send a store request to the peer and map its refusals.

parammethodstr
paramkeystr
paramheadersdict[str, str] | None
= None
parambodybytes
= b''

Returns

httpx.httpx.Response
funcget(key) -> tuple[bytes, str] | None

Fetch an object from the peer.

paramkeystr

Returns

tuple[bytes, str] | None
funcput(key, data, if_match=None, if_absent=False) -> str

Write an object on the peer.

paramkeystr
paramdatabytes
paramif_matchstr | None
= None
paramif_absentbool
= False

Returns

str
funcdelete(key, if_match=None) -> None

Delete an object on the peer.

paramkeystr
paramif_matchstr | None
= None

Returns

None
funclist(prefix='') -> dict[str, str]

List the peer's objects.

paramprefixstr
= ''

Returns

dict[str, str]

On this page