Skip to content

Commit 8874cb3

Browse files
authored
hive/simulation: Add method to get hive instance info (#8)
* hive/simulation: Add method to get hive instance info * fixup
1 parent 1a546d0 commit 8874cb3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/hive/simulation.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,10 @@ def client_types(self, *, role: ClientRole | None = None) -> List[ClientType]:
5252
if role:
5353
return [c for c in clients if role in c.roles()]
5454
return clients
55+
56+
def hive_instance(self) -> dict:
57+
"""Return information about the Hive instance."""
58+
url = f"{self.url}/hive"
59+
response = requests.get(url)
60+
response.raise_for_status()
61+
return response.json()

0 commit comments

Comments
 (0)