{ "info": { "author": "bjyurkovich", "author_email": "bj.yurkovich@technicity.io", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# iotery.io Embedded Python SDK\n\nThe python iotery.io SDK is intended to be used on your embedded device to interact with the itoery.io IoT Platform. The SDK is a fully featured wrapper for the [REST API](https://iotery.io/docs/embedded).\n\n## Getting Started\n\nSetup your free account on [iotery.io](https://dashboard.iotery.io) and go to your [dashboard](https://iotery.io/devices) get started with creating device types and devices.\n\nAfter you get your key, install the SDK:\n\n```bash\npip install iotery-embedded-python-sdk\n```\n\n> Note: Make sure you are using Python 3.5+!\n\nAnd finally, some simple example usage:\n\n```python\nfrom iotery_embedded_python_sdk import Iotery\nTEAM_ID=\"265fcb74-8889-11f9-8452-d283610663ec\" # team ID found on the dashboard: https://iotery.io/system\niotery = Iotery()\nd = iotery.getDeviceTokenBasic(data={\"key\": \"thermal_sensor_001\",\n \"serial\": \"THERMAL_SENSOR_001\", \"secret\": \"thermal_sensor_001_secret\", \"teamUuid\": TEAM_ID})\niotery.set_token(d[\"token\"])\nme = iotery.getMe()\n\nprint(me[\"name\"])\n\n```\n\n## API\n\nThis SDK simply wraps the [REST API](https://iotery.io/docs/embedded), so more information and specifics can be found there. Since the API is a wrapper around the REST API, the syntax is standard for each of the Create, Read, Update, and Delete operations on iotery.io resources. All methods return a dictonary containing the API response. If there is an error, the method will `raise` an expection.\n\n### Creating Resources\n\nThe generalized syntax for creating resources in iotery.io python sdk looks like:\n\n```python\niotery.methodName(inputParameter=\"parameter\", data={ \"data\": \"variables\" })\n```\n\nFor example, to create a device, the python would look like\n\n```python\ncreateDeviceCommandInstanceEmbedded(\n deviceUuid=\"a-valid-device-type-uuid\",\n commandTypeUuid=\"a-valid-command-type-uuid\",\n data={}\n)\n```\n\nwhere `createDeviceCommandInstanceEmbedded` maps to `methodName`, `deviceUuid` maps to `inputParameter`, and `data={}` and maps to the dictonary `{data : \"variables\"}` in the generalized form given above.\n\nThe available resource creation (POST) methods are\n\n| `methodName` | `input` | link | `description`\n|:-----------:|:-----------:|:-----------:|:-----------:|\n| getDeviceTokenBasic | | [link](https://iotery.io/docs/embedded#tag/Embedded/paths/~1embedded~1basic~1get-token/post) | Get token for device via key, serial, and secret. |\n| reportAlreadyExecutedCommands | | [link](https://iotery.io/docs/embedded#tag/Embedded/paths/~1embedded~1command-instances~1executed/post) | Report an already executed set of commands to the server. |\n| createDeviceCommandInstance | deviceUuid,commandTypeUuid | [link](https://iotery.io/docs/embedded#tag/Embedded/paths/~1embedded~1devices~1:deviceUuid~1command-types~1:commandTypeUuid/post) | Create a command instance via a device. |\n| postData | deviceUuid | [link](https://iotery.io/docs/embedded#tag/Embedded/paths/~1embedded~1devices~1:deviceUuid~1data/post) | Post data to the cloud. |\n| upsertDeviceSettings | deviceUuid | [link](https://iotery.io/docs/embedded#tag/Embedded/paths/~1embedded~1devices~1:deviceUuid~1settings/post) | Upsert settings for a device. |\n| uploadDeviceLogs | deviceUuid | [link](https://iotery.io/docs/embedded#tag/Embedded/paths/~1embedded~1devices~1:deviceUuid~1upload-log-file/post) | Upload zip file of device logs. |\n| getDeviceTokenAsymmetric | | [link](https://iotery.io/docs/embedded#tag/Embedded/paths/~1embedded~1token~1asymmetric/post) | Get device token based on encrypted credentials. |\n\n### Reading Resources\n\nThe generalized syntax for reading (getting) resources in iotery.io python sdk looks like:\n\n```python\niotery.methodName(inputParameter=\"parameter\", opts={\"query\":\"parameter\"})\n```\n\nFor example, to get a device by it's unique identifier `uuid`, the python would look like\n\n```python\ngetDeviceTypeFirmwareRecord(\n deviceUuid=\"a-valid-device-uuid\",\n version=\"valid version\",\n opts={ \"limit\": 1 }\n)\n```\n\nwhere `getDeviceTypeFirmwareRecord` maps to `methodName`, `deviceUuid` maps to `inputParameter`, and `{ \"limit\": 1 }` maps to the dictonary `{\"query\" : \"parameters\"}` in the generalized form given above.\n\n> The `limit` option is for instructive purposes only. By definition, a `uuid` is unique and so there will never be more than one device for a given `uuid`.\n\nThe available resource creation methods are\n\n| `methodName` | `input` | link | `description`\n|:-----------:|:-----------:|:-----------:|:-----------:|\n| getBrokerAddress | | [link](https://iotery.io/docs/embedded#tag/Embedded/paths/~1embedded~1broker-address/get) | Get the MQTT broker address. |\n| getCommandTypeList | | [link](https://iotery.io/docs/embedded#tag/Embedded/paths/~1embedded~1command-types/get) | Get a list of available command types. |\n| getCurrentTimestamp | | [link](https://iotery.io/docs/embedded#tag/Embedded/paths/~1embedded~1current-timestamp/get) | Get the current server time in epoch (unix) time. |\n| getDataTypeList | | [link](https://iotery.io/docs/embedded#tag/Embedded/paths/~1embedded~1data-types/get) | Get a list of available data types. |\n| getDeviceSettingList | deviceUuid | [link](https://iotery.io/docs/embedded#tag/Embedded/paths/~1embedded~1devices~1:deviceUuid~1settings/get) | Get a list of settings for a device. |\n| getDeviceUnexecutedCommandInstanceList | deviceUuid | [link](https://iotery.io/docs/embedded#tag/Embedded/paths/~1embedded~1devices~1:deviceUuid~1unexecuted-commands/get) | Get a list of unexecuted command instances for a device. |\n| getDeviceTypeFirmwareRecord | deviceTypeUuid,version | [link](https://iotery.io/docs/embedded#tag/Embedded/paths/~1embedded~1firmware~1:deviceTypeUuid~1:version/get) | Get a desired version of a firmware record for a given device type. |\n| getPublicCloudKey | | [link](https://iotery.io/docs/embedded#tag/Embedded/paths/~1embedded~1key/get) | Get base64 encoded public key from the server for use in RSA scheme. |\n| getMe | | [link](https://iotery.io/docs/embedded#tag/Embedded/paths/~1embedded~1me/get) | Get information about the device. |\n| getNotificationTypeList | | [link](https://iotery.io/docs/embedded#tag/Embedded/paths/~1embedded~1notification-types/get) | Get a list of available notifications. |\n| getSettingTypeList | | [link](https://iotery.io/docs/embedded#tag/Embedded/paths/~1embedded~1setting-types/get) | Get a list of available setting types. |\n\n### Updating Resources\n\nThe generalized syntax for updating resources in iotery.io python sdk looks like:\n\n```python\niotery.methodName(inputParameter=\"parameter\", data={ \"data\": \"variables\" })\n```\n\nFor example, to update a device type, the code would look like\n\n```python\nupdateDeviceChannel(\n deviceUuid=\"a-valid-device-type-uuid\",\n channelId=\"1\",\n data={}\n)\n```\n\nwhere `updateDeviceChannel` maps to `methodName`, `deviceUuid` maps to `inputParameter`, and `{}` maps to the dictonary `{data : \"variables\"}` in the generalized form given above (if there was a body).\n\nThe available resource creation methods are\n\n| `methodName` | `input` | link | `description`\n|:-----------:|:-----------:|:-----------:|:-----------:|\n| setBatchedCommandInstancesAsExecuted | batchReferenceUuid | [link](https://iotery.io/docs/embedded#tag/Embedded/paths/~1embedded~1batch-command-instances~1:batchReferenceUuid~1executed/patch) | Set a collection of batched command instances as executed. |\n| setCommandInstanceAsExecuted | commandInstanceUuid | [link](https://iotery.io/docs/embedded#tag/Embedded/paths/~1embedded~1command-instances~1:commandInstanceUuid~1executed/patch) | Report that a command has been executed to the server. |\n| updateDeviceChannel | deviceUuid,channelId | [link](https://iotery.io/docs/embedded#tag/Embedded/paths/~1embedded~1devices~1:deviceUuid~1channelId~1:channelId/patch) | Update device channel. |\n| setNotificationInstanceInactive | notificationInstanceUuid | [link](https://iotery.io/docs/embedded#tag/Embedded/paths/~1embedded~1notification-instances~1:notificationInstanceUuid~1inactive/patch) | Set notification instance inactive. |\n\n### Deleting Resources\n\nThe generalized syntax for reading (getting) resources in iotery.io python sdk looks like:\n\n```python\niotery.methodName(inputParameter=\"parameter\", opts={\"query\":\"parameter\"})\n```\n\nFor example, to get a device by it's unique identifier `uuid`, the python would look like\n\n```python\ndeleteDevice(\n deviceUuid=\"a-valid-device-uuid\",\n opts={ \"some\": \"option\" }\n)\n```\n\nwhere `deleteDevice` maps to `methodName`, `deviceUuid` maps to `inputParameter`, and `{ \"some\": \"option\" }` maps to the dictonary `{\"query\" : \"parameters\"}` in the generalized form given above.\n\nThe available resource creation methods are\n\n| `methodName` | `input` | link | `description`\n|:-----------:|:-----------:|:-----------:|:-----------:|\n\n\n## Contributing\n\nWe welcome contributors and PRs! Let us know if you are interested.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bjyurkovich/iotery-embedded-python-sdk", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "iotery-embedded-python-sdk", "package_url": "https://pypi.org/project/iotery-embedded-python-sdk/", "platform": "", "project_url": "https://pypi.org/project/iotery-embedded-python-sdk/", "project_urls": { "Homepage": "https://github.com/bjyurkovich/iotery-embedded-python-sdk" }, "release_url": "https://pypi.org/project/iotery-embedded-python-sdk/0.1.8/", "requires_dist": [ "requests" ], "requires_python": "", "summary": "iotery.io embedded python SDK", "version": "0.1.8" }, "last_serial": 5625431, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "51280b42f1ba9bff9f429d9e8541d872", "sha256": "1af403d6a93376f2585a91569989682ed483941c6cd322a5c180a46c1b028ad7" }, "downloads": -1, "filename": "iotery_embedded_python_sdk-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "51280b42f1ba9bff9f429d9e8541d872", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11590, "upload_time": "2019-06-12T17:40:32", "url": "https://files.pythonhosted.org/packages/e0/28/d262989260f42b1cfc5de4492da4d2b5fd6f9d41b2d371d513984fedfd37/iotery_embedded_python_sdk-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c23b74cd177f64361ecd90675c90594d", "sha256": "6f0ac226c6ed44aa961bc0df2883ffa5a9c78678ee2e87250e387136619f03e7" }, "downloads": -1, "filename": "iotery-embedded-python-sdk-0.1.0.tar.gz", "has_sig": false, "md5_digest": "c23b74cd177f64361ecd90675c90594d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7524, "upload_time": "2019-06-12T17:40:35", "url": "https://files.pythonhosted.org/packages/ae/49/e35821781a7d5582eca16ff2405f499ea469193448212b944e3a5364b560/iotery-embedded-python-sdk-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "78a10989b34f4ffed30e78e100b4a4d5", "sha256": "30cf7aab84c8a404975e6df5230c66e9c1a0f1d2a6fac115ea0fb90cf0dffa40" }, "downloads": -1, "filename": "iotery_embedded_python_sdk-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "78a10989b34f4ffed30e78e100b4a4d5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11587, "upload_time": "2019-06-12T17:43:18", "url": "https://files.pythonhosted.org/packages/3a/68/aeb7f654bf37d9f6b9498f60e30bf665fb5d11d525c31426283f73121840/iotery_embedded_python_sdk-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5784e2ae6286f0cb786f6814b72ebb15", "sha256": "40baea820d5ae73f87ce9ed0791ee3b6f9b23c8b138abc1229a3a01588986245" }, "downloads": -1, "filename": "iotery-embedded-python-sdk-0.1.1.tar.gz", "has_sig": false, "md5_digest": "5784e2ae6286f0cb786f6814b72ebb15", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7318, "upload_time": "2019-06-12T17:43:20", "url": "https://files.pythonhosted.org/packages/21/4b/8eda329adcbcf56f624229e26577a761e69a1a311a8ce83dafff7044702c/iotery-embedded-python-sdk-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "f4f5599506407bdcec1963f0767a7f58", "sha256": "d6074fc68225d63e879d8fc2f684855006e710ebb30493b6a6e25a83904eb266" }, "downloads": -1, "filename": "iotery_embedded_python_sdk-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "f4f5599506407bdcec1963f0767a7f58", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11147, "upload_time": "2019-06-12T17:44:19", "url": "https://files.pythonhosted.org/packages/67/bd/f8d852cce5df13960b0035c6fa05892c2e7243fa1b9c78f2c37ecb70996e/iotery_embedded_python_sdk-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c4fc5baeff5fb05578ed9d524478264a", "sha256": "812558ae8b3cb658ef460514b81789148b1a20841f0fbdd7f886c3ea091cf027" }, "downloads": -1, "filename": "iotery-embedded-python-sdk-0.1.2.tar.gz", "has_sig": false, "md5_digest": "c4fc5baeff5fb05578ed9d524478264a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6591, "upload_time": "2019-06-12T17:44:22", "url": "https://files.pythonhosted.org/packages/30/7d/6579213787c14106fdc82185fdde4f2c6b82c7c26ee2e3af2e7d0e5f8fc1/iotery-embedded-python-sdk-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "cd4080aeb49362b772541e17f90fee0a", "sha256": "2471dee5a28a70bb0ee843d2d7079b449d65dd5f2aad7b380942be977babcd3b" }, "downloads": -1, "filename": "iotery_embedded_python_sdk-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "cd4080aeb49362b772541e17f90fee0a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11164, "upload_time": "2019-06-12T17:45:09", "url": "https://files.pythonhosted.org/packages/7d/e5/397905bb529efc31aa330b8407a1878b0934d21621b7a7bf261f24024a97/iotery_embedded_python_sdk-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c042e8cb9f3330546cc3d3c95564b6ba", "sha256": "b975e484a991f36dfad8996317e1adb8d2bff413fadb0f4b35be93c6ec9d1731" }, "downloads": -1, "filename": "iotery-embedded-python-sdk-0.1.3.tar.gz", "has_sig": false, "md5_digest": "c042e8cb9f3330546cc3d3c95564b6ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6620, "upload_time": "2019-06-12T17:45:13", "url": "https://files.pythonhosted.org/packages/03/5e/460b8b04b8dfd14c1040616ad51258289daf42aa801d8a56bd162412137c/iotery-embedded-python-sdk-0.1.3.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "7126b89ec3ae4deef25a94a795a05028", "sha256": "63b2353e9669b97ecaee1d17decacd3b070e694b30ad206d75df2dd68dad00b4" }, "downloads": -1, "filename": "iotery_embedded_python_sdk-0.1.6-py3-none-any.whl", "has_sig": false, "md5_digest": "7126b89ec3ae4deef25a94a795a05028", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10568, "upload_time": "2019-06-12T18:01:48", "url": "https://files.pythonhosted.org/packages/7b/f9/73206b11da72b4bce893233a0a815afa5f008e921214aedd9daa0414bdff/iotery_embedded_python_sdk-0.1.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7b5adc4bebfd5e07feafac0d2a7ffe8b", "sha256": "10f6b2700e8de53cfbd6c1ef32dc8b4af4dd2225b61fc8332d69636ce6514d7a" }, "downloads": -1, "filename": "iotery-embedded-python-sdk-0.1.6.tar.gz", "has_sig": false, "md5_digest": "7b5adc4bebfd5e07feafac0d2a7ffe8b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6729, "upload_time": "2019-06-12T18:01:49", "url": "https://files.pythonhosted.org/packages/88/9f/8375b85c76bed24af48171e6f4511799088ddabc30d44872523413a6b885/iotery-embedded-python-sdk-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "b6c4f3e2527575ad5efeeecdc5fa6d65", "sha256": "6e1d4ef9c0e74297ce44b918249c45ad5d7067b3383a299f98076bcb491cfbfd" }, "downloads": -1, "filename": "iotery_embedded_python_sdk-0.1.7-py3-none-any.whl", "has_sig": false, "md5_digest": "b6c4f3e2527575ad5efeeecdc5fa6d65", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10565, "upload_time": "2019-06-12T20:13:28", "url": "https://files.pythonhosted.org/packages/77/8d/db6ae4ec90784d79720a281983a884e02356098ef7215d922a5f123db459/iotery_embedded_python_sdk-0.1.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b67c56557fcabc84cafcce40dc8cc829", "sha256": "f983ce92a69d9c105954950dd4174265d6a775d9343d7e06c04c31b7fe67b5e2" }, "downloads": -1, "filename": "iotery-embedded-python-sdk-0.1.7.tar.gz", "has_sig": false, "md5_digest": "b67c56557fcabc84cafcce40dc8cc829", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6698, "upload_time": "2019-06-12T20:13:29", "url": "https://files.pythonhosted.org/packages/e8/30/fcad7ae2b6df229360be5e3322ae0a6f40bd9a4d6be7627620fca0560633/iotery-embedded-python-sdk-0.1.7.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "d1afdfae14bfa40eb08b2540cbf1e5ff", "sha256": "d561fa743fc05de44ef8ad4b87488275ad4d39753ef1879c73867ce24e369039" }, "downloads": -1, "filename": "iotery_embedded_python_sdk-0.1.8-py3-none-any.whl", "has_sig": false, "md5_digest": "d1afdfae14bfa40eb08b2540cbf1e5ff", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10632, "upload_time": "2019-08-02T17:49:25", "url": "https://files.pythonhosted.org/packages/b4/0b/03d13712239edcd0fe6396132e026f27e75aa8af7f55f47806c0ca3fc7a8/iotery_embedded_python_sdk-0.1.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "11aacdb983519e49271427fa740f1a2c", "sha256": "fddbad69fab3d37bb2875a960cf1b63e70a0cf288655ab287c6bfa72cde68095" }, "downloads": -1, "filename": "iotery-embedded-python-sdk-0.1.8.tar.gz", "has_sig": false, "md5_digest": "11aacdb983519e49271427fa740f1a2c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6717, "upload_time": "2019-08-02T17:49:26", "url": "https://files.pythonhosted.org/packages/de/d9/515d97b3bf959294cbf39b4da8deb41a702c861f1a9b50ce65968589caee/iotery-embedded-python-sdk-0.1.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d1afdfae14bfa40eb08b2540cbf1e5ff", "sha256": "d561fa743fc05de44ef8ad4b87488275ad4d39753ef1879c73867ce24e369039" }, "downloads": -1, "filename": "iotery_embedded_python_sdk-0.1.8-py3-none-any.whl", "has_sig": false, "md5_digest": "d1afdfae14bfa40eb08b2540cbf1e5ff", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10632, "upload_time": "2019-08-02T17:49:25", "url": "https://files.pythonhosted.org/packages/b4/0b/03d13712239edcd0fe6396132e026f27e75aa8af7f55f47806c0ca3fc7a8/iotery_embedded_python_sdk-0.1.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "11aacdb983519e49271427fa740f1a2c", "sha256": "fddbad69fab3d37bb2875a960cf1b63e70a0cf288655ab287c6bfa72cde68095" }, "downloads": -1, "filename": "iotery-embedded-python-sdk-0.1.8.tar.gz", "has_sig": false, "md5_digest": "11aacdb983519e49271427fa740f1a2c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6717, "upload_time": "2019-08-02T17:49:26", "url": "https://files.pythonhosted.org/packages/de/d9/515d97b3bf959294cbf39b4da8deb41a702c861f1a9b50ce65968589caee/iotery-embedded-python-sdk-0.1.8.tar.gz" } ] }