This is the Mainflux Python SDK, a python driver for Mainflux HTTP API API reference in the Swagger UI can be found here.
Does both system administration (provisioning) and messaging.
To install mainflux SDK to your system you will need to have pip installed.
- To install in a virtual environment
virtualenv mainfluxVenv --python=python3.8
source mainfluxVenv/bin/activate
pip install mainflux
- To install system wide
pip install mainflux
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
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)
Official documentation for the SDK is hosted at here. Documentation is auto-generated, the instructions to generate one are:
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.
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 directly, and he will point you out to the best-matching support team.
Thank you for your interest in Mainflux and the desire to contribute!
- Take a look at our open issues. The good-first-issue label is specifically for issues that are great for getting started.
- Checkout the contribution guide to learn more about our style and conventions.
- Make your changes compatible to our workflow.