Skip to main content

Client library for the Kisters Hydraulic Network Storage service

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

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

kisters.water.hydraulic_network.client-0.1.0.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file kisters.water.hydraulic_network.client-0.1.0.tar.gz.

File metadata

  • Download URL: kisters.water.hydraulic_network.client-0.1.0.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.5

File hashes

Hashes for kisters.water.hydraulic_network.client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d61385993b5ddb584c7d73bd8e4c435226e084511f4aae28da50e5b4c8f8552e
MD5 38523fb4aa25ca38da01b5c4c6d9911d
BLAKE2b-256 5178e96e3a67bc94ca1c475d056180e6575c5e04e01a74b5726e1c7fb412f767

See more details on using hashes here.

File details

Details for the file kisters.water.hydraulic_network.client-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for kisters.water.hydraulic_network.client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 80d09126e689a59b6cfcefaac0cc3cba44fc5edf387a7e8a0c21030f3a188667
MD5 9635c123632a43ef056b72c9f31970e9
BLAKE2b-256 61f348da68326a0a7e7b7c9274f0681c09fa56805116f453814ef8702b79351b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page