Client library for the Kisters Network Store service
Project description
Hydraulic Network Client Library
This library allows connections to remote hydraulic network REST servers. It supports authentication with OpenID Connect.
Installation
Install with pip
:
> python -m pip install kisters.water.hydraulic_network.client
Example Usage
Create the Kisters REST Client
from kisters.water.rest_client import RESTClient
from kisters.water.rest_client.auth import OpenIDConnect
rest_client = RESTClient(
url="https://jesse-test.hydraulic-network.kisters.cloud",
authentication=OpenIDConnect(
client_id="jesse-test",
client_secret="c4b0f70d-d2e6-497f-b11c-d49fe806c29b",
),
)
# Verify the client is set up correctly
# Note: If you have not created any networks yet, this could be an empty list
rest_client.get(("rest", "networks"))
# ['my-network', 'my-other-network', ...]
Connect to a Network
from kisters.water.hydraulic_network.client import Network
# Instantiate the Network class with the network name and client
network = Network("my-network", rest_client)
# You can now access the properties of the network
network.get_nodes()
# [
# FlowBoundary(
# created=datetime.datetime(2019, 6, 27, 16, 53, 5),
# uid='flow_boundary',
# display_name='flow_boundary',
# location={'x': 0.0, 'y': 0.0, 'z': 0.0},
# schematic_location={'x': 0.0, 'y': 0.0, 'z': 0.0})
# ,
# ...
# ]
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for kisters.network_store.client.network-0.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5985a91a7d8d4260c6511c56acda1725eb74aa7559b1d306035b56f7a1ea1627 |
|
MD5 | 614280c12d0099c7887e6386b3fb787c |
|
BLAKE2b-256 | 9139a352d6619486d6b82f42eacf966dc3b7c8b773f552e37250118b29b61cbd |
Close
Hashes for kisters.network_store.client.network-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01817dee60aa8c688e83a03c07f33106286488c77d06d45e42324d369ae10914 |
|
MD5 | 765b448376b4da6aa6c74e0e579927ee |
|
BLAKE2b-256 | 350c75f6fd7b99b8267fb531e4d250b30c5fd51312990c984947be6e09dddd0b |