
A new version of Lighthive is pushed to the Python package index with the tag 0.3.0
. As usual, pip install lighthive --upgrade
is enough to get the latest version.
As a client, it's important to select the closest/fastest node to your server.
For example, if your script/app runs in a server at Europe, it makes sense to connect one of the Europe nodes. Same logic applies for the different parts of the world; for Asia, US, etc.
Now, we have that selection automatic at Lighthive; If you pass automatic_node_selection
flag True to the Client instance, nodes will be sorted by the response time.
Related measurement calls are done via asyncio
and httpx
, concurrently. This speeds up the process, however, it still takes some time to request all nodes. That's why automatic_node_selection
is disabled by default.

Example usage:
import logging
from lighthive.client import Client
c = Client(loglevel=logging.DEBUG, automatic_node_selection=True)
Logging output:
2021-12-30 17:20:28,515 lighthive INFO Measurements:
https://rpc.ausbit.dev: 0.12 [s]
https://api.openhive.network: 0.12 [s]
https://hive-api.arcange.eu: 0.12 [s]
https://hived.emre.sh: 0.14 [s]
https://api.deathwing.me: 0.15 [s]
https://rpc.ecency.com: 0.16 [s]
https://api.hive.blue: 0.19 [s]
https://api.pharesim.me: 0.28 [s]
https://api.hive.blog: 0.46 [s]
https://techcoderx.com: 0.77 [s]
2021-12-30 17:20:28,516 lighthive INFO Automatic node selection took 0.81 seconds.
2021-12-30 17:20:28,516 lighthive INFO Node set as https://rpc.ausbit.dev
Also updated the default node list with the up to date public nodes. See the related pull request.