shelly-cloud


Nameshelly-cloud JSON
Version 0.2.0 PyPI version JSON
download
home_page
SummaryA Python API for accessing the Shelly devices.
upload_time2022-12-13 06:52:23
maintainer
docs_urlNone
author
requires_python>=3.7
license
keywords shelly kfw api cloud
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # shelly-cloud

A python library to access the Shelly cloud API. Refer also to the [Shelly API Docs](https://shelly-api-docs.shelly.cloud/cloud-control-api/communication). This repo provides functionality for:

- Getting devices status
- Getting the status of a single device
- Getting a list of device IDs

## Installing the library locally

Python 3 is recommended for this project.

```bash
python -m pip install -e .
```

> **This is needed for the first time when working with the library/examples/tests.**

## Example usage

```bash
SHELLY_API_URL="https://HOST:PORT" SHELLY_API_TOKEN="REPLACE_ME" python3 examples/simple.py
```

or

```python
from shellyapi.shellyapi import ShellyApi

shelly = ShellyApi('provide_api_url', 'provide_api_token')
# or you can define additional optional parameters
# shelly = ShellyApi('provide_api_url', 'provide_api_token', timeout=10)

print(shelly.get_device_ids())
```

## Development

### Installing required pip packages

```bash
python pip install -r requirenments.txt
pre-commit install -t pre-push
```

### Linting

```bash
pylint shellyapi/*.py tests/*.py examples/*.py
```

### Unit testing

```bash
pytest tests/*.py

# show logs
pytest -o log_cli=true

# code coverage
pytest --durations=10 --cov-report term-missing --cov=shellyapi tests
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "shelly-cloud",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "shelly,kfw,api,cloud",
    "author": "",
    "author_email": "Ingmar Mueller <ingmar.mueller@kfw.de>, Mario Macai <mario.macai@accenture.com>, Melissa Schmidt <melissa.schmidt@accenture.com>, Georgia Moldovan <georgia.moldovan@accenture.com>, Felix Stark <felix.stark@kfw.de>",
    "download_url": "https://files.pythonhosted.org/packages/df/41/054f8df8d2b2b2fda1c7e92ee53245f65823a740d75716c3552a96aa7694/shelly-cloud-0.2.0.tar.gz",
    "platform": null,
    "description": "# shelly-cloud\n\nA python library to access the Shelly cloud API. Refer also to the [Shelly API Docs](https://shelly-api-docs.shelly.cloud/cloud-control-api/communication). This repo provides functionality for:\n\n- Getting devices status\n- Getting the status of a single device\n- Getting a list of device IDs\n\n## Installing the library locally\n\nPython 3 is recommended for this project.\n\n```bash\npython -m pip install -e .\n```\n\n> **This is needed for the first time when working with the library/examples/tests.**\n\n## Example usage\n\n```bash\nSHELLY_API_URL=\"https://HOST:PORT\" SHELLY_API_TOKEN=\"REPLACE_ME\" python3 examples/simple.py\n```\n\nor\n\n```python\nfrom shellyapi.shellyapi import ShellyApi\n\nshelly = ShellyApi('provide_api_url', 'provide_api_token')\n# or you can define additional optional parameters\n# shelly = ShellyApi('provide_api_url', 'provide_api_token', timeout=10)\n\nprint(shelly.get_device_ids())\n```\n\n## Development\n\n### Installing required pip packages\n\n```bash\npython pip install -r requirenments.txt\npre-commit install -t pre-push\n```\n\n### Linting\n\n```bash\npylint shellyapi/*.py tests/*.py examples/*.py\n```\n\n### Unit testing\n\n```bash\npytest tests/*.py\n\n# show logs\npytest -o log_cli=true\n\n# code coverage\npytest --durations=10 --cov-report term-missing --cov=shellyapi tests\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A Python API for accessing the Shelly devices.",
    "version": "0.2.0",
    "split_keywords": [
        "shelly",
        "kfw",
        "api",
        "cloud"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "c1c950bcd503ede39947df14f05f2483",
                "sha256": "8346e787ecc686727467b0c192b2cc1cd7ac6e521016715ec39be40bdcf1ba0a"
            },
            "downloads": -1,
            "filename": "shelly_cloud-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c1c950bcd503ede39947df14f05f2483",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 17651,
            "upload_time": "2022-12-13T06:52:21",
            "upload_time_iso_8601": "2022-12-13T06:52:21.206797Z",
            "url": "https://files.pythonhosted.org/packages/7a/a7/489233038d06785c30b522fc339b9729ccb3d9806d3d3dea36f264bc08ef/shelly_cloud-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "2d55bc984a9ef65d507fe69375d5a98c",
                "sha256": "eea9e2dcdf358dcc43dbed80ed5ef72c2170da357570ab9537aa70fc0173215e"
            },
            "downloads": -1,
            "filename": "shelly-cloud-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "2d55bc984a9ef65d507fe69375d5a98c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 16808,
            "upload_time": "2022-12-13T06:52:23",
            "upload_time_iso_8601": "2022-12-13T06:52:23.292266Z",
            "url": "https://files.pythonhosted.org/packages/df/41/054f8df8d2b2b2fda1c7e92ee53245f65823a740d75716c3552a96aa7694/shelly-cloud-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-13 06:52:23",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "shelly-cloud"
}
        
Elapsed time: 0.01755s