helium_py.api.cities.Cities

class helium_py.api.cities.Cities(host=None, port=None, user_agent=None, base_path=None)[source]

Bases: API

Cities client class for Helium Blockchain API.

https://docs.helium.com/api/blockchain/cities

__init__(host=None, port=None, user_agent=None, base_path=None)

Allow for overriding API details at instantiation.

Methods

__init__([host, port, user_agent, base_path])

Allow for overriding API details at instantiation.

all([search])

Yield all cities.

get_by_id(city_id)

Return city identified by provided city_id.

hotspots_for_id(city_id, params)

Yield hotspots for provided city_id.

Attributes

base_path

client

Return a client singleton per API.

host

port

user_agent

all(search: Optional[str] = None) Generator[dict, None, None][source]

Yield all cities.

Args:

search: Search term.

Returns:

All cities found by calling the api.

property client: Client

Return a client singleton per API.

get_by_id(city_id: str) dict[source]

Return city identified by provided city_id.

Args:

city_id: The id for a city in the API.

hotspots_for_id(city_id: str, params: Optional[dict]) Generator[dict, None, None][source]

Yield hotspots for provided city_id.

Args:

city_id: The id for a city in the API. params: Params for filter_modes_api decorator