Kisters液压网络存储服务的客户端库

kisters.water.hydraulic-network.client的Python项目详细描述


液压网络客户端库

此库允许连接到远程液压网络rest服务器。它 支持使用openid connect进行身份验证。

安装

安装时使用pip

> python -m pip install kisters.water.hydraulic_network.client

示例用法

创建客户端

fromkisters.water.hydraulic_network.clientimport(OpenIDConnect,# provides authentication tokens for the clientRESTClient,# communicates with a network store service)# Instantiate the authentication class with credentialsauthentication=OpenIDConnect(issuer_url="https://auth.kisters.cloud/auth/realms/external",client_id="jesse-test",client_secret="c4b0f70d-d2e6-497f-b11c-d49fe806c29b",)# Instantiate the client class with the service url and authenticationclient=RESTClient(url="https://jesse-test.hydraulic-network.kisters.cloud/",authentication=authentication)# Verify the client is set up correctly# Note: If you have not created any networks yet, this could be an empty listclient.get(("rest","networks"))# ['my-network', 'my-other-network', ...]

连接到网络

fromkisters.water.hydraulic_network.clientimportNetwork# Instantiate the Network class with the network name and clientnetwork=Network("my-network",client)# You can now access the properties of the networknetwork.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})# ,# ...# ]

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java查询,该查询应返回特定相关实体的实体   java创建了两个可运行的JAR,它们使用相同的库而不需要两次   java swing应用程序如何设置面板中组件的高度(和宽度)   在fat jar中找不到java JasperReport文件错误   kotlin在java中如何称呼这个构造函数?   java为什么被零除是一个不可恢复的问题?   java为SUTime添加用于解析季度的自定义规则   java merge 2带所有元素的排序列表   从字符串StringUtils Java中提取数字   java ForLoops最大和最小数   java我可以为嵌入式tomcat 8定义始终保持活动状态的最小executer线程数吗?   java当metod返回ResponseEntry<Resource>抛出错误时,如何返回ModelandView?   java片段翻译和电话定位错误   javagwt:如何让regex(模式和匹配器)在客户端工作   java EAR文件和“WebSphere增强的EAR”之间有什么区别?