Skip to main content

The python client node v2 for the UBII framework

Project description

Python client node v.2 for UBII

This is the package for thepython client node v2 for the UBII framework https://github.com/SandroWeber/ubii-node-python-v2

Requirements and installation

  • Tested for:
    • Linux and Windows
    • Python >= 3.7

How to use

  • Import the UbiiClientNode module and instanciate the client node
    from UBII.ubii_client_node import UbiiClientNode
    
    node = UbiiClientNode('pythonNodev2', 'http://localhost:8102/services/binary', 'ws://localhost:8104')
    
  • Use the node to make service calls, subscribe to topics, publish topic data
    request = ServiceRequest()
    request.topic = '/services/topic_list'
    response = self.node.call_service(request)
    
    
    topicDataRecord = TopicDataRecord()
    topicDataRecord.topic = 'testTopic'
    node.publish(topicDataRecord)
     
    def printTopicDataRecord(record):
      print(record)
     
    node.subscribeTopic('testTopic', printTopicDataRecord)
    
    
    node.stopNode()
    
  • For more information on the module check the documentation

Bugs

  • There is a problem in python 3.9 and 3.10 where starting threads while the interpreter shuts down can lead to a RuntimeError: 'cannot schedule new futures after interpreter shutdown'. If this occurs one quck fix is to add a time.sleep to the end of the main file. BSD 3-Clause License

Copyright (c) 2024, IN-FAR / Ubi-Interact, Sandro Weber (webers@in.tum.de) All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  • Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

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

Ubii-Python-Node-v2-0.1.0.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

Ubii_Python_Node_v2-0.1.0-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file Ubii-Python-Node-v2-0.1.0.tar.gz.

File metadata

  • Download URL: Ubii-Python-Node-v2-0.1.0.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for Ubii-Python-Node-v2-0.1.0.tar.gz
Algorithm Hash digest
SHA256 21e952fe98f047b63ea116c25f1db7e13ff5aff0dc5664d6e40f0bbbdbef3530
MD5 7b8a05824f7a3cae52dbb9a91919f41e
BLAKE2b-256 9b06e5fbae49053e37254db847fe2af280c732bf3c06670fbccb37b4b8e6153a

See more details on using hashes here.

File details

Details for the file Ubii_Python_Node_v2-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for Ubii_Python_Node_v2-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5f7c8af028a37050b7ba567b41fcf2de4445f055833605303f7700bcf4e98da3
MD5 0582a0876a85ff1ec3308f8a94d6b203
BLAKE2b-256 a0c9a37e76216a9a9901d7ba94d0807097d912e02f0340248122cc85e177e0d9

See more details on using hashes here.

Supported by

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