Retrieve one key

Retrieves the content value for the queried key for an address.

Returns

The content for the key.

If no aggregate for the address and the key is found, null will be returned.

If the address doesn't have an aggregate, the resource not found error will be returned.

Usage

def fetch_aggregate(
    address,
    key,
    session,
    api_server,
)

Required Arguments

address - string

The chain address the aggregate was created for.

key - string

The key the aggregate was created for.

Optional Arguments

  • 3. session Default: None

  • 4. api_server - string Default:"https://api2.aleph.im Target API Server

Example

>>> from aleph_client.synchronous import fetch_aggregate
>>> fetch_aggregate("0x06DE0C46884EbFF46558Cd1a9e7DA6B1c3E9D0a8",
... "profile")

{"bio": "tester", "name": "Moshe on Ethereum"}

Last updated