Saravanan666/pypi-org huggingface dataset:
Package: iot-inspector-client
IoT Inspector API ClientThis is the official Python client for theIoT Inspectorpublic API.UsageFirst, you have to log in and select a tenant:fromiot_inspector_clientimportClientYOUR_API_URL="https://demo.iot-inspector.com/api"client=Client(api_url=YOUR_API_URL)client.login(EMAIL,PASSWORD)tenant=client.get_tenant("Environment name")client.use_tenant(tenant)After you logged in and selected the tenant, you can query the GraphQL APIGET_ALL_FIRMWARES="""query {allFirmwares {idname}}"""res=client.query(GET_ALL_FIRMWARES)print(res)GET_PRODUCT_GROUPS="""query {allProductGroups {idname}}"""res=client.query(GET_PRODUCT_GROUPS)default_product_group=next(pgforpginres["allProductGroups"]ifpg["name"]=="Default")You can upload firmwares:metadata=FirmwareMetadata(name="myFirmware",vendor_name="myVendor",product_name="myProduct",product_group_id=default_product_group["id"],)firmware_path=Path("/path/to/firmware.bin")res=client.upload_firmware(metadata,firmware_path,enable_monitoring=True)print(res)SupportYou can create anew issue in this repoor contact us atsupport@iot-inspector.com.
Package: iot.io
iot.io Serveriot.io OverviewThis project aims to create a lightweight and intuitive system for connecting
IoT devices to a central server for small IoT system implementations and hobbyists.The framework focuses on providing easy to use system of libraries so the end user does
not need to understand the protocol implementation, though this also is fairly simple.The format of the framework is somewhat reminiscent ofSocket.IOwhere handlers functions are defined and executed and run as events are triggered.Quickstart Guide (Server)This is an example of a simple IoTManager instance which accepts a "EhcoClient"
and will print every message the client sends out to console.fromflaskimportFlaskfromiotioimportIoTManager,DeviceType,IoTClientfromeventletimportwsgiimporteventlet"""Example implementation of a Echo server.Defines an EchoClient of type 'echo'.Works with the corresponding 'echo' iot.io-client example."""# create a flask appapp=Flask("Echo Example")# create an instance of the IoTManagermanager=IoTManager(app)# define the EchoClient deviceclassEchoClient(DeviceType):defon_connect(self,client:IoTClient):print("EchoClient Connected! ID: "+client.id)# define a handler for when the client receives a "echo" eventdefon_echo(self,message:str,client:IoTClient):print("Message from Client of type '"+self.type+"' with ID '"+client.id+"': '",message,"'")# respond to client with the 'echo_response' eventreturn"echo_response",messagedefon_disconnect(self,client:IoTClient):print("EchoClient Disconnected! ID: "+client.id)# add the device type to the managermanager.add_type(EchoClient("echo"))# run the server using eventletif__name__=="__main__":wsgi.server(eventlet.listen(('0.0.0.0',5000)),app)If you would like to see the matching quickstart guide for an example
client gohere.
Package: iot.io-client
iot.io Clientiot.io OverviewThis project aims to create a lightweight and intuitive system for connecting
IoT devices to a central server for small IoT system implementations and hobbyists.The framework focuses on providing easy to use system of libraries so the end user does
not need to understand the protocol implementation, though this also is fairly simple.The format of the framework is somewhat reminiscent ofSocket.IOwhere handlers functions are defined and executed and run as events are triggered.Quickstart Guide (Client)This is an example of a simple IoTClient instance which connects to a server accepting
"echo" clients ping the server every 5 seconds with a message and print the server's response.fromiotio_clientimportIoTClientimportthreadingimporttime# create clientclient=IoTClient("echo_test_client","echo")# define a handler for "echo_response" events@client.on("echo_response")defecho(data):print("'echo_response' from Server: '"+str(data)+"'\n")defsend():client.ensure_open()# loop while client is connectedwhileclient.connected:message=input("Enter a value to send to the server: ")# send message over the echo channelclient.send("echo",message)print("")time.sleep(1)# start background send tasksend_thread=threading.Thread(None,send)send_thread.start()# connect clientclient.run("localhost:5000",use_tls=False)send_thread.join()If you would like to see the matching quick-start guide for an example
server gohere.
Package: iotkaran
Project descriptionthis library for connect to server iotkaran and send data to dashboardAddres Dashboard :https://dashboard.iotkaran.irAutomatic Installationpip3 install iotkaranwww.iotkaran.irGitHubExampleAutomatic Installation>>> from iotkaran import Client
>>> iotk = Client("server.iotkaran.ir", 2323)
Package: iotlabmqtt
Provide access to IoT-LAB experiments as MQTT agents.Protocol documentationIoT-LAB-MQTT DocumentationDevelopped in the context ofARMOUR European Union projectInstallationInstall in server mode on IoT-LAB frontend:git clone https://github.com/iot-lab/iot-lab-mqtt.git
cd iot-lab-mqtt
pip install --user -e .[server]Install in client mode on your computer:git clone https://github.com/iot-lab/iot-lab-mqtt.git
cd iot-lab-mqtt
pip install --user .Add python user install directory to thePATHby
appending the following line in your~/.bashrc:export PATH="${HOME}/.local/bin:${PATH}"You can do it with:echo 'export PATH="${HOME}/.local/bin:${PATH}"' >> ~/.bashrc
# Reload configuration
source ~/.bashrcIf you do not have this, you will need to run the scripts from the
repository directory prefixed with"./", so for example./iotlab-mqtt-clients.DocumentationThe documentation can be generated with:pip install --user sphinx
make -C doc htmlContextServerTo use the tools, you should have use a MQTT broker.
For this doc, I will useiot.eclipse.org.
Both server and client agents will communicate through this centralized server.TopicsMQTT is based on publish/subscribe on topics that are URLs.To prevent collisions, I advise to prefix your URLs with something specific
to your experiment and instance.
I would say something like:my/experiment/on/blablabla/IOTLAB_USERNAME/IOTLAB_EXPERIMENT_IDProviding prefix on the tools uses the--prefixoption.More advancedSee the documentation on the implementationRunningOn the server, you should run theserveragents first:iotlab-mqtt-serial       [ARGUMENTS]
iotlab-mqtt-radiosniffer [ARGUMENTS]
iotlab-mqtt-node         [ARGUMENTS]
iotlab-mqtt-process      [ARGUMENTS]And on the client, you should run either your client, or the provided example:iotlab-mqtt-clients serial       [ARGUMENTS]
iotlab-mqtt-clients radiosniffer [ARGUMENTS]
iotlab-mqtt-clients node         [ARGUMENTS]
iotlab-mqtt-clients process      [ARGUMENTS]
iotlab-mqtt-clients log          [ARGUMENTS]ArgumentsYou can get the list of arguments with--helpoption.Global MQTT configurationBroker address, url of the MQTT server:brokerBroker port, defaults to 1883 (when I wrote it):--broker-port BROKER_PORTTopics prefix, your topic namespace:--prefix PREFIXClient MQTT configurationServer agent site name, IoT-LAB site name:--site IOTLAB_SITEIoT-LAB API usage configurationConfiguration for server that use IoT-LAB API (radiosniffer).
When not provided, the tool tries to detect them from.iotlabrcand current
running experiment.IoT-LAB API username:--iotlab-user IOTLAB_USERNAMEIoT-LAB API password:--iotlab-password IOTLAB_PASSWORDIoT-LAB experiment ID to use:--experiment-id EXPERIMENT_ID
Package: iotlab-mqtt-bridge
IoT-lab to MQTT bridgeThis module provides an easy way to redirect the input/output of the serial ports of iot-lab nodes to a MQTT broker. It only creates these bridges for the last experiment started.The core of the module is a script intended to be run on an iotlab ssh frontend. Utilities are provided to help you run that script on the server automatically when the experiment start.Installationpip3 install iotlab_mqtt_bridgeOn your own computer you will not be able to launch the module directly, but you will be able to use the module in scripts (see Examples).On iotlab ssh frontends, the script may already be installed by your local admin.ConfigurationsThe following parameters of the bridge can be configured :broker IPbroker portverbositybroker authentification usernamebroker authentification passwordtopic root (topic_roothereafter) is used to construct individual node topics.ID dictionnary (json file) used to convert iotlab IDs to a custom set of ids (each must be unique).Node topicsEach individual node topic root is constructed as follow :The local node name is exctracted from its address. Ex:dwm1001-1.toulouse.iot-lab.infobecomesdwm1001-1If an ID dictionnary was provided, this local node name (dwm1001-1in our example) is used as a key in the dictionnary to determine the new identifier, otherwise the local name is used as identifier.topic_rootis prepended to this identifier to form thenode_topicNode output handlingThe serial output if each node is split into substrings at every '\n' character, then each substring is published in a single message (containing also the node id and a timestamp) on a specific topic (<node_topic>/out) for each node.If this string can be parsed as a JSON object, it is also published on a second topic (<node_topic>/out_json). The payload of messages on the latter topic are thus guaranteed to be valid json objects.Node input handlingEach message received on<node_topic>/ingets written directly on the serial port of the associated node.ExamplesCLIRun on iotlab ssh frontend :python3 -m iotlab_mqtt_bridge -b <x.x.x.x> -u <username> -p <password> -t "topic_root/"In python scriptSee examples/script_launcher.py in module directory.Improvements doable if there is demandContact me if you need them, I'll see what I can do.certificate handlingolder experiment handling
Package: iotlabwscli
Websocket CLI Toolsprovides a set of commands for interacting remotely and
easily with IoT-Lab nodes using the Websosket protocol.Websocket CLI Toolscan be used in conjunction with theIoT-Lab CLI Toolscommands likeiotlab-authandiotlab-experiment.Installation:You need pythonpip.
To install ws-cli-tools, use pip (or pip3 for Python 3):$ pip install iotlabwscli --userExample:Start an experiment, wait for it to be ready and connect to the serial port:$ iotlab-experiment submit -d 120 -l saclay,m3,1,tutorial_m3.elf
{
    "id": 65535
}
$ iotlab-experiment wait
Waiting that experiment 65535 gets in state Running
"Running"
$ iotlab-ws
Using custom api_url: https://www.iot-lab.info/rest/
Connected to m3-1.saclay

h
m3-1.saclay:
m3-1.saclay:
m3-1.saclay: IoT-LAB Simple Demo program
m3-1.saclay: Type command
m3-1.saclay:        h:      print this help
m3-1.saclay:        t:      temperature measure
m3-1.saclay:        l:      luminosity measure
m3-1.saclay:        p:      pressure measure
m3-1.saclay:        u:      print node uid
m3-1.saclay:        d:      read current date using control_node
m3-1.saclay:        s:      send a radio packet
m3-1.saclay:        b:      send a big radio packet
m3-1.saclay:        e:      toggle leds blinking
m3-1.saclay:
e
m3-1.saclay: cmd >
m3-1.saclay: leds > off
m3-1.saclay:
l
m3-1.saclay: cmd > Luminosity measure: 2.4414062 lux
m3-1.saclay:
^CExiting
0
Package: iotloranode
# rak811-python
RAK811 Python Library for use with LoRa pHAT &amp; MicroBIT NodeCurrently the library is very early on in development. At the moment you will have to do the following:Connect via SSH or open a terminal up.Run sudo raspi-config
Select option “5 Interfacing Options”
Then select option “P6 Serial”It will ask you if you want a login shell to be accessible over serial, select no.
It will then ask you if you would like the serial port hardware to be enabled, select yes.Press enter and then finish. It will ask if you would like to reboot and select yes.It’ll reboot and then either re-connect or re-open a terminal.Next download the python file to a directory you wish, currently it isn’t available via Pip but will be soon.The easiest way is to wgethttps://raw.githubusercontent.com/PiSupply/rak811-python/master/iotloranode.pyFinally you will need to install python serial which can be done with “sudo apt install python3-serial python3-rpi.gpio”We’re still working on the documentation and all of the functions but you can see an example athttps://github.com/PiSupply/rak811-python/blob/master/example.pyto get started.
Package: iot-lru-cache
iot-lru-cacheThis package is an implementation of a Least Recently Used (LRU) caching algorithm for optimized caching on an IoT edge device.Official Documentation|Source code|Package PyPITable of ContentsVersioningGetting StartedPrerequisitesBasic ExamplesVersioningThis repository adheres toSemantic Versioning. It will be maintained through theCHANGELOG.mdand in GitHub Releases.It's important to notethat you must maintain the version with your releases iniot/lru/cache/_version.py, otherwise a new package version will fail to get published.Getting StartedThis section provides basic examples with theiot-lru-cache.PrerequisitesPython 3.7 or later is required to use this package.Basic ExamplesInstall viapip:pipinstalliot-lru-cacheImport and say hello:fromiot.lru.cacheimport__version__print(f"hello world from iot-lru-cache version:{__version__}")Basic usage:fromiot.lru.cacheimportIoTLRUCache# instantiate cachecache=IoTLRUCache(capacity=100)# print info w/ reprprint(f"{cache.__repr__()}")# add a key-value pair to the cachecache.put(key="my_key",value={"my":"value"})# retrieve the value for a given key (returns -1 if not found)val=cache.get(key="my_key")
Package: iot-message
#IOT:1My custom protocol for communication between devices at home.
It uses UPD and broadcast.
Messages are json strings.## Message body:{
    "protocol": "iot:1",
    "node": "Rpi-lcd-1",
    "chip_id": "RpiB",
    "event": "lcd.content",
    "parameters: [
        "content": "-(=^.^)"
    ],
    "response": '',
    "targets": [
        "nodemcu-lcd-40x4"
    ]
}protocol: defines name, currently iot:1node: friendly node name like light-room-big or screen-one-kitchenchip_id: a unique device idevent: event name like light.on or displayparameters: array of parameters. like rows to displayresponse: used when responding to request, ie returning toilet statetargets: message targets node with this names. special keyword ALL for all nodes in network## set node name or/and chip_idMessage.chip_id = 'miau'
Message.node_name = 'miau_too'### Message()Create new instance. It is automatically filled with chip_id and node_name if not set### Message(string_message)Creates message and fills with received datainput = """{"protocol": "iot:1", "node": "node_name", "chip_id": "aaa", "event": "channel.on", "parameters": {"channel": 0}, "response": "", "targets": ["node-north"]}"""
msg = factory.MessageFactory.create(input)## functions### set(dictionary)msg = message.Message()
msg.set({
    'event': 'event.test',
    'parameters': {
        'is_x': '1'
    }
})Fills message with params.### send messages.sendto(bytes(msg), address)### get valuemsg = message.Message()
msg.set({
    'event': 'event.test',
    'parameters': {
        'is_x': '1'
    }
})

print(msg['event'])### AES encryptorUses AES-CBC with hmac signing.
require: pip install pycryptodomeCryptor takes four parameters:def __init__(self, staticiv, ivkey, datakey, passphrase):
    self.staticiv = staticiv
    self.ivkey = ivkey
    self.datakey = datakey
    self.passphrase = passphraseUsage:from iot_message.cryptor.aes_sha1 import Cryptor as AES

Message.add_decoder(AES(
    'abcdef2345678901', '2345678901abcdef', '0123456789abcdef', 'mypassphrase'
))
Package: iotools-hy
#+TITLE: iotools.hyIO tools for Hy.* iotools** iotools.bufferFlexible buffer data struct.#+begin_src hy(setv buffer (Buffer b"hello"))#(buffer.pos buffer.data) ; 0 b"hello"(.read buffer 2) ; b"he"#(buffer.pos buffer.data) ; 2 b"hello"(.strip buffer)#(buffer.pos buffer.data) ; 0 b"llo"#+end_src=Buffer.readexactly= or =Buffer.readuntil= will raise=BufferWantReadError= if there has no enough data, in this case, usershould revert buffer.pos, push more data to buffer, and then readagain.** iotools.structDSL used to describe data structures.*** simple struct spec#+begin_src hy(defstruct Short [int :len 2])(Short.pack 1) ; b"\x00\x01"(Short.unapck b"\x00\x01") ; 1#+end_src*** complex struct spec#+begin_src hy(defstruct ShortPair[[first [int :len 2]][second [int :len 2]]])(ShortPair.pack #(1 2)) ; b"\x00\x01\x00\x02"(ShortPair.unpack b"\x00\x01\x00\x02") ; #(1 2)#+end_src*** class struct spec#+begin_src hy(defstruct int2 [int :len 2])(defstruct Short int2)(defstruct ShortPair [[first Short] [second Short]])#+end_src*** more complex struct specSee =iotools.proto= or =iotools-tls13.struct= for more examples.** iotools.streamSync/Async stream abstraction, based on =dash.do/a!=.This module inspired by Python built-in =ssl.SSLObject=: for any readfunction =f= that read data from read buffer, reapeatedly push newdata from stream to read buffer and call =f= on read buffer, while=BufferWantReadError= was raised.** iotools.utilSync/Async object alias, and basic stream implementation.Alias:- =(name/a! sleep)=: =time.sleep= =asyncio.sleep=- =(name/a! Lock)=: =threading.Lock= =asyncio.Look=- =(name/a! Queue)=: =queue.Queue= =asyncio.Queue=- ...Basic streams: =IOStream=, =FileStream=, =BytesStream=,=SocketStream=, =AIOStream=, =(name/a! TCPStream)=.* iotools.protoSimple protocol implementation based on iotools.** iotools.proto.ssl=ssl.SSLObject= wrapper.#+begin_src hy(with [stream (SyncTCPStream.open host port)](let [connector (SyncSSLConnector :ssl-context (ssl.create-default-context):server-hostname host)](with [stream (.handshake connector stream)]...)))#+end_src** iotools.proto.http*** HTTPChunkedStream#+begin_src hy(with stream [SyncTCPStream.open host port](.write stream (HTTPRequest.pack "GET" "/" "HTTP/1.1" {"Host" host}))(.flush stream)(let [#(version status reason headers) (.read-loop stream HTTPResponse.read)stream (if (= (-get headers "Transfer-Encoding") "chunked")(SyncHTTPChunkedStream :next-layer stream)stream)]...))#+end_src*** HTTPProxyConnector/Acceptor#+begin_src hy(with [stream (SyncTCPStream.open proxy-host proxy-port)](let [connector (SyncHTTPProxyConnector :host host :port port)](with [stream (.handshake connector stream)]...)))#+end_src** iotools.proto.ws#+begin_src hy(with [stream (SyncTCPStream.open host port)](let [connector (SyncWSConnector :host host)](with [stream (.handshake connector stream)]...)))#+end_src** iotools.proto.socks5Similar with =iotools.proto.http=.
Package: iotoutlier1
Purpose"Comparison of data representation for outlier detection in IOT"1. Requirements (pip3 freeze > requirements.txt)python==3.7.4
seaborn==0.9.0
scipy==1.3.1
matplotlib==3.1.1
scapy==2.4.3
pandas==0.25.1
pyod==0.7.4
numpy==1.17.0
umap_learn==0.3.10
scikit_learn==0.21.3
umap==0.1.1
keras==2.3.1  # for autoencoder
tensorflow==2.0.02. Project Directory Structureiot_outlier_src: source root directory (set 'iot_outlier_src' as sources root)|- input_data: raw dataif any file is more than 100MB, please do not store it at here|- output_data: resultsfigures: store roc and auc
model_dumpling: store models to disk
...|- data_process:pcap2features
    features2dataset|- detectorgmm
ocsvm|- utilstoolkit to preprocess input data, such as 'load data', 'normalization data'
visualization: plot data to visualize 
    ..|- log: use to log middle or tmp results....|-legacy: backup...Mainmain_featcomp-class.pydocsTo do ...testsTo do ...Note:
Package: iot-protocols
author: Delhaye Adrien
year: 2023Iot ProtocolsThis package contains easy to use module for communication using various IIoT protocols.Installpipinstalliot-protocolsUpload on TwineUpload pyporject.tomlMore detailled informations onhttps://packaging.python.org/en/latest/tutorials/packaging-projects/Open the pyproject.toml file and update at least theversionfield with your current verion following the template :Foralpharelease:<version>.<subversion>.<fix>-a<i>
Forbetarelease:<version>.<subversion>.<fix>-b<i>
Forrelasecandidaterelease:<version>.<subversion>.<fix>-rc<i>
Forfinalrelease:<version>.<subversion>.<fix>Save your changesSave everything.Test everyting.Push the files on the gitlab repository with version associated TAG.Build the packageEnsure you have upgraded pip:py-mpipinstall--upgradepipThen from the root directory where thepyproject.tomlfile belongs, execute :py-mbuildThis will generate your package tar.gz and wheel files into thebuildfolder.Upload the distFirst ensure you have twine updated:py-mpipinstall--upgradetwineGet your username and token from PyPiUse the following command to upload and gives your username and token to authentify, with username as '__token__':py-mtwineuploaddist/<package-file-to-update>You can also, if the build package doesn't exists yet on the PyPi registry use :py-mtwineuploaddist/*How to useCMD line testYou can use the command line interface to explicitely make request using one of the available protocol.
To to this, call themain.pyscript and pass the disired and or required arguments to the command.For exemple, using the modbus client:Modbus ClientIEC62056 ClientSnap-7 Client
Package: iotrans
# iotransA package to easily convert structured data into various file formats## Requirements
* Python 3.6
* geopandas>=0.4.0
* xmltodict>=0.12.0## Installation
Using PIP via PyPIpip install iotransManually via GITgit clonehttps://github.com/open-data-toronto/iotranscd iotrans
python setup.py install## Usage`python import geopandas as gpd import iotrans `### Geospatial data to XML`python df =gpd.read_file([data_path])iotrans.to_file(df,'./data.xml')``'./data.xml'`### Output as a zip file`python df =gpd.read_file([data_path])iotrans.to_file(df,'./data.shp')``'./data.zip'`## Supported Formats
### Tabular Formats
* CSV
* JSON
* XML### Geospatial Formats
* CSV
* GeoJSON
* GeoPackage
* Shapefile## Contribution
All contributions, bug reports, bug fixes, documentation improvements, enhancements and ideas are welcome.### Reporting issues
Please report issues [here](https://github.com/open-data-toronto/iotrans/issues).### Contributing
Please develop in your own branch and create Pull Requests into thedevbranch when ready for review and merge.## License[MIT License](https://github.com/open-data-toronto/iotrans/blob/master/LICENSE)
Package: iotrelay-eagle
An Eagle™ Home Energy Gateway plugin for IoT RelayRelease v1.0.2iotrelay-eagle is a data source plugin for IoT Relay. It polls an
Eagle™ Home Energy Gateway for power readings and forwards those
readings to data handlers connected to IoT Relay. This lets you pull
data from a smart meter and forward it for logging or analysis.More information about IoT Relay may be found in itsDocumentation.iotrelay-eagle uses theMeter Readerlibrary to communicate with
the Eagle™ Home Energy Gateway.iotrelay-eagle is available on PyPI and can be installed via pip.$pipinstalliotrelay-eagleConfiguration; ~/.iotrelay.cfg[iotrelay-eagle]series key=poweraddress=192.168.3.253timeout=4poll frequency=9LicenseCopyright (c) 2016, Emmanuel Levijarvi
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.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.NoticeEagle™ is a trademark of Rainforest™ Automation