Skip to main content

A library to authenticate and interact with STIHL iMow mowers using their WebAPI

Project description

STIHL iMow Unofficial Python API Wrapper

PyPI version shields.io CI PyPI download total PyPI pyversions PyPI license

This unofficial Python API was created to provide an interface to interact with the STIHL iMow mower WebAPI. This wrapper is able to receive the current status status from the mowers and to send actions

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Python 3.7+ is required to run this application, other than that there are no prerequisites for the project, as the dependencies are included in the repository.

Installing

To install the library is as simple as cloning the repository and running

pip install -e .

It is recommended to create an virtual environment prior to installing this library. Alternatively, you can also install this library via Pip:

pip install imow-webapi

And have fun!

Dev Notes

Run unit tests locally:

pytest --verbosity=2 -s [--token "REDACTED"]

Add the -k test_* option if you want to test only a single function.

Usage

Import the module and instantiate the AnonFile() constructor. Setting the download directory in path is optional. Using the API token in the constructor is optional as well. A valid token registers all file uploads online, i.e. a list of all uploaded files is made accessible to any user that signs into your account .

from imow.api import IMowApi

api = IMowApi()

# receive a list of the available mowers in your account
print(api.receive_mowers())

Testing

For unit testing run pytest -s tests/test_unit*. For upstream integration testing, provide a /secrets.py with the following contents:

EMAIL = "my-stihl-imow-account@email.com"
PASSWORD = "supersecret"
MOWER_NAME = "MyRobot"

and run pytest -s tests/test_integration* or pytest -s.

Built With

Versioning

Navigate to tags on this repository to see all available versions.

Authors

Name Mail Address GitHub Profile
Christian Heinrichs chris.heinrichs.mail@gmail.com ChrisHaPunkt

License

This project is licensed under the MIT License - see the LICENSE.md license file for more details.

Acknowledges

Thanks to

for repo structure inspiration

Changelog

Version 0.1.0 (2021-06-00)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

imow-webapi-0.2.0.tar.gz (11.2 kB view hashes)

Uploaded Source

Built Distribution

imow_webapi-0.2.0-py3-none-any.whl (10.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page