## Python SDK
[![Testing](https://github.com/mainflux/sdk-py/actions/workflows/python-testing.yml/badge.svg?branch=main)](https://github.com/mainflux/sdk-py/actions/workflows/python-testing.yml)
[![Check SDK documentation](https://github.com/mainflux/sdk-py/actions/workflows/docs.yml/badge.svg?branch=main)](https://github.com/mainflux/sdk-py/actions/workflows/docs.yml)
This is the Mainflux Python SDK, a python driver for [Mainflux HTTP API](https://docs.mainflux.io/api/) API reference in the Swagger UI can be found [here](https://api.mainflux.io/).
Does both system administration (provisioning) and messaging.
## Installation
To install mainflux SDK to your system you will need to have pip installed.
1. To install in a virtual environment
```sh
virtualenv mainfluxVenv --python=python3.8
source mainfluxVenv/bin/activate
pip install mainflux
```
2. To install system wide
```sh
pip install mainflux
```
## Usage
You can interact with the mainflux API by calling the various Python SDK functions.
First you need to start mainflux in your system by following the guide [here](https://github.com/mainflux/mainflux#usage)
```python
from mainflux import SDK
default_url = "http://localhost"
sdk = SDK()
# Example to create an account
mf_resp = sdk.users.create({"email": "<user_email>", "password": "<user_password>"})
if mf_resp.error.status == 0:
print(mf_resp.value)
else:
print(mf_resp.error.message)
```
## Documentation
Official documentation for the SDK is hosted at [here](https://github.com/mainflux/sdk-py/tree/main/docs/README.md). Documentation is auto-generated, the instructions to generate one are:
```sh
pip install lazydocs requests
python3 setup.py install
lazydocs --src-base-url="https://github.com/mainflux/sdk-py/blob/main/" --overview-file="README.md" lib
```
Please note that lazydocs requires Python version 3.5 or higher.
If you spot an error or a need for corrections, please let us know - or even better: send us a PR.
## Professional Support
There are many companies offering professional support for the Mainflux system.
If you need this kind of support, best is to reach out to [@drasko](https://github.com/drasko) directly, and he will point you out to the best-matching support team.
## Contributing
Thank you for your interest in Mainflux and the desire to contribute!
1. Take a look at our [open issues](https://github.com/mainflux/sdk-py/issues). The [good-first-issue](https://github.com/mainflux/sdk-py/labels/good-first-issue) label is specifically for issues that are great for getting started.
2. Checkout the [contribution guide](CONTRIBUTING.md) to learn more about our style and conventions.
3. Make your changes compatible to our workflow.
## Community
- [Google group](https://groups.google.com/forum/#!forum/mainflux)
- [Gitter](https://gitter.im/mainflux/mainflux?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
- [Twitter](https://twitter.com/mainflux)
## License
[Apache-2.0](LICENSE)
Raw data
{
"_id": null,
"home_page": "https://github.com/mainflux/sdk-py",
"name": "Mainflux",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "mainflux iot wrapper api",
"author": "Filip Bugarski",
"author_email": "filipbugarski@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/fe/3a/3c3b6be511c6161bd40f87dc4e22e2b589a7e3a1128992c47b19dffbdfe1/Mainflux-0.0.4.tar.gz",
"platform": null,
"description": "## Python SDK\n\n[![Testing](https://github.com/mainflux/sdk-py/actions/workflows/python-testing.yml/badge.svg?branch=main)](https://github.com/mainflux/sdk-py/actions/workflows/python-testing.yml)\n[![Check SDK documentation](https://github.com/mainflux/sdk-py/actions/workflows/docs.yml/badge.svg?branch=main)](https://github.com/mainflux/sdk-py/actions/workflows/docs.yml)\n\nThis is the Mainflux Python SDK, a python driver for [Mainflux HTTP API](https://docs.mainflux.io/api/) API reference in the Swagger UI can be found [here](https://api.mainflux.io/).\n\nDoes both system administration (provisioning) and messaging.\n\n## Installation\n\nTo install mainflux SDK to your system you will need to have pip installed.\n\n1. To install in a virtual environment\n\n```sh\nvirtualenv mainfluxVenv --python=python3.8\nsource mainfluxVenv/bin/activate\npip install mainflux\n```\n\n2. To install system wide\n\n```sh\npip install mainflux\n```\n\n## Usage\n\nYou can interact with the mainflux API by calling the various Python SDK functions.\n\nFirst you need to start mainflux in your system by following the guide [here](https://github.com/mainflux/mainflux#usage)\n\n```python\nfrom mainflux import SDK\n\ndefault_url = \"http://localhost\"\n\nsdk = SDK()\n\n# Example to create an account\nmf_resp = sdk.users.create({\"email\": \"<user_email>\", \"password\": \"<user_password>\"})\nif mf_resp.error.status == 0:\n print(mf_resp.value)\nelse:\n print(mf_resp.error.message)\n```\n\n## Documentation\n\nOfficial documentation for the SDK is hosted at [here](https://github.com/mainflux/sdk-py/tree/main/docs/README.md). Documentation is auto-generated, the instructions to generate one are:\n\n```sh\npip install lazydocs requests\npython3 setup.py install\nlazydocs --src-base-url=\"https://github.com/mainflux/sdk-py/blob/main/\" --overview-file=\"README.md\" lib\n```\n\nPlease note that lazydocs requires Python version 3.5 or higher.\n\nIf you spot an error or a need for corrections, please let us know - or even better: send us a PR.\n\n## Professional Support\n\nThere are many companies offering professional support for the Mainflux system.\n\nIf you need this kind of support, best is to reach out to [@drasko](https://github.com/drasko) directly, and he will point you out to the best-matching support team.\n\n## Contributing\n\nThank you for your interest in Mainflux and the desire to contribute!\n\n1. Take a look at our [open issues](https://github.com/mainflux/sdk-py/issues). The [good-first-issue](https://github.com/mainflux/sdk-py/labels/good-first-issue) label is specifically for issues that are great for getting started.\n2. Checkout the [contribution guide](CONTRIBUTING.md) to learn more about our style and conventions.\n3. Make your changes compatible to our workflow.\n\n## Community\n\n- [Google group](https://groups.google.com/forum/#!forum/mainflux)\n- [Gitter](https://gitter.im/mainflux/mainflux?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n- [Twitter](https://twitter.com/mainflux)\n\n## License\n\n[Apache-2.0](LICENSE)\n\n\n",
"bugtrack_url": null,
"license": "Apache",
"summary": "Python SDK",
"version": "0.0.4",
"split_keywords": [
"mainflux",
"iot",
"wrapper",
"api"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8ed26a3080deb28298ba2a0a43c2dfe869588e22e22afa79b267d218205ddbfb",
"md5": "1a8965e7774947ac3407270330790aa6",
"sha256": "7aaa904ab40d22219826b95a3d5eb9a11c601e5dcbba0eb322227d61d8ffbcdc"
},
"downloads": -1,
"filename": "Mainflux-0.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1a8965e7774947ac3407270330790aa6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 6523,
"upload_time": "2023-03-14T15:59:36",
"upload_time_iso_8601": "2023-03-14T15:59:36.870399Z",
"url": "https://files.pythonhosted.org/packages/8e/d2/6a3080deb28298ba2a0a43c2dfe869588e22e22afa79b267d218205ddbfb/Mainflux-0.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fe3a3c3b6be511c6161bd40f87dc4e22e2b589a7e3a1128992c47b19dffbdfe1",
"md5": "41a8efd86b8cd154f720dc4dc98a1246",
"sha256": "8684b3f63d02fb6f3b5e6d59f0cde8a8daae83d5d52c3e26bd45b50325dcff2b"
},
"downloads": -1,
"filename": "Mainflux-0.0.4.tar.gz",
"has_sig": false,
"md5_digest": "41a8efd86b8cd154f720dc4dc98a1246",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 6558,
"upload_time": "2023-03-14T15:59:38",
"upload_time_iso_8601": "2023-03-14T15:59:38.919459Z",
"url": "https://files.pythonhosted.org/packages/fe/3a/3c3b6be511c6161bd40f87dc4e22e2b589a7e3a1128992c47b19dffbdfe1/Mainflux-0.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-14 15:59:38",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "mainflux",
"github_project": "sdk-py",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "mainflux"
}