Source code for stellar_sdk.call_builder.call_builder_sync.accounts_call_builder

from typing import Any, Dict, Generator

from ...call_builder.base.base_accounts_call_builder import BaseAccountsCallBuilder
from ...call_builder.call_builder_sync.base_call_builder import BaseCallBuilder
from ...client.base_sync_client import BaseSyncClient

__all__ = ["AccountsCallBuilder"]


[docs] class AccountsCallBuilder(BaseCallBuilder, BaseAccountsCallBuilder): """Creates a new :class:`AccountsCallBuilder` pointed to server defined by horizon_url. Do not create this object directly, use :func:`stellar_sdk.Server.accounts`. See `List All Accounts <https://developers.stellar.org/api/resources/accounts/list/>`__ for more information. :param horizon_url: Horizon server URL. :param client: The client instance used to send request. """ def __init__(self, horizon_url, client: BaseSyncClient) -> None: super().__init__(horizon_url=horizon_url, client=client)
[docs] def stream( self, ) -> Generator[Dict[str, Any], None, None]: """Creates an EventSource that listens for events from the `Accounts` endpoint. See `Streaming <https://developers.stellar.org/docs/data/apis/horizon/api-reference/structure/streaming>`__ for more information. """ return self._stream()