Repository for the python client
- Docker
- Python 3
cd ~
mkdir controlnet-docker
cd controlnet-docker
wget https://mayank31313.github.io/docker/socket_server/docker-compose.yml
docker-compose up
For this example no external configuration is needed, all the settings are predefined. The below example will only give a use case on the controlnet platform.
git clone https://github.com/mayank31313/ior-python
cd ior-python/examples
python3 LatencyCheck.py ../config/from.json ../config/to.json
Run the following command, use either command as per the need
python3 setup.py install
pip3 install git+https://github.com/mayank31313/ior-python.git
config = {
"server": "localhost",
"httpPort": 5001,
"socketServer": "localhost",
"tcpPort": 8000,
#"useSSL": True # Optional
}
from ior_research.IOTClient import IOTClientWrapper
iot = IOTClientWrpper(token=token, config = config) #Creating object for IOT Client
iot.set_on_receive(lambda x: print(x))
iot.start()
iot.join() #Since IOTClient inherites Thread Class you can also use .join() function depending on your use case