Skip to content

Musilah/sdk-py

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python SDK

Testing Check SDK documentation

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.

Installation

To install mainflux SDK to your system you will need to have pip installed.

  1. To install in a virtual environment
virtualenv mainfluxVenv --python=python3.8
source mainfluxVenv/bin/activate
pip install mainflux
  1. To install system wide
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

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. 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.

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 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. The good-first-issue label is specifically for issues that are great for getting started.
  2. Checkout the contribution guide to learn more about our style and conventions.
  3. Make your changes compatible to our workflow.

Community

License

Apache-2.0

About

Python SDK for Mainflux

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%