Unofficial flexible library for HexWay Hive REST API.
pip install hexway-hive-api- pydantic ~= 2.4
- requests ~= 2.31.0
- aiohttp ~= 3.9.0
from hexway_hive_api import RestClient
def main() -> None:
auth = {
"server": "https://demohive.hexway.io/",
"username": "someuser",
"password": "somepassword",
}
with RestClient().connection(**auth) as client:
projects = client.get_projects().get("items")
client.update_project(project_id=1, fields={"name": "New Project Name"})
if __name__ == "__main__":
main()import asyncio
from hexway_hive_api import AsyncRestClient
async def main() -> None:
auth = {
"server": "https://demohive.hexway.io/",
"username": "someuser",
"password": "somepassword",
}
async with AsyncRestClient().connection(**auth) as client:
projects = (await client.get_projects()).get("items")
await client.update_project(project_id=1, fields={"name": "New Project Name"})
asyncio.run(main())AsyncHTTPClient accepts an optional ssl context in its constructor or
through :meth:update_params. This context will be passed to all requests if no
ssl argument is provided explicitly. Verification of server certificates can
be toggled via the verify_ssl flag or verify parameter in
:meth:update_params and individual request methods. Disabling verification will
still keep TLS encryption enabled. AsyncRestClient.connect also respects the
verify / verify_ssl options when establishing the session.