pyowletapi


Namepyowletapi JSON
Version 2024.10.1 PyPI version JSON
download
home_pagehttps://github.com/ryanbdclark/pyowletapi
SummaryOwlet baby montior API wrapper
upload_time2024-10-09 19:02:14
maintainerNone
docs_urlNone
authorRyan Clark
requires_python>=3.10
licenseNone
keywords owlet api baby
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Introduction

Inspiration and API reverse engineering taken from various projects:

https://github.com/BastianPoe/owlet_api

https://github.com/mbevand/owlet_monitor


## Install
To install via pip run command 

```
pip install pyowletapi
```

## To do
Tidy up exception logging

Create test routines

## Use
import the api and sock objects

```python
from pyowletapi.api import OwletAPI
from pyowlet.sock import Sock
```

create an api object passing your region, username and password, the OwletAPI will also take a aiohttp session as a keyword argument

```python
api = OwletAPI('europe', username, password)
```

you can then authenticate against the Owlet servers using this object and create a list of sock objects

```python
await api.authenticate()
socks = {device['device']['dsn']: Sock(api, device['device']) for device in devices}
```

to get current reading from sock call the update_properties function on each sock object
```python
device.update_properties()
```
This will return a dictionary, the key 'raw_properties' contains the raw response as a dict and the 'properties' key is a more cut down dict version of the response showing only the most relevant data and the 'tokens' key will return a dictionary if the api tokens have changed since the last call

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ryanbdclark/pyowletapi",
    "name": "pyowletapi",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "owlet, api, baby",
    "author": "Ryan Clark",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/09/0e/540f5895fd1a534b3998b9964bbddb936aaa6733f3af6a041fcaba3479da/pyowletapi-2024.10.1.tar.gz",
    "platform": null,
    "description": "# Introduction\r\n\r\nInspiration and API reverse engineering taken from various projects:\r\n\r\nhttps://github.com/BastianPoe/owlet_api\r\n\r\nhttps://github.com/mbevand/owlet_monitor\r\n\r\n\r\n## Install\r\nTo install via pip run command \r\n\r\n```\r\npip install pyowletapi\r\n```\r\n\r\n## To do\r\nTidy up exception logging\r\n\r\nCreate test routines\r\n\r\n## Use\r\nimport the api and sock objects\r\n\r\n```python\r\nfrom pyowletapi.api import OwletAPI\r\nfrom pyowlet.sock import Sock\r\n```\r\n\r\ncreate an api object passing your region, username and password, the OwletAPI will also take a aiohttp session as a keyword argument\r\n\r\n```python\r\napi = OwletAPI('europe', username, password)\r\n```\r\n\r\nyou can then authenticate against the Owlet servers using this object and create a list of sock objects\r\n\r\n```python\r\nawait api.authenticate()\r\nsocks = {device['device']['dsn']: Sock(api, device['device']) for device in devices}\r\n```\r\n\r\nto get current reading from sock call the update_properties function on each sock object\r\n```python\r\ndevice.update_properties()\r\n```\r\nThis will return a dictionary, the key 'raw_properties' contains the raw response as a dict and the 'properties' key is a more cut down dict version of the response showing only the most relevant data and the 'tokens' key will return a dictionary if the api tokens have changed since the last call\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Owlet baby montior API wrapper",
    "version": "2024.10.1",
    "project_urls": {
        "Homepage": "https://github.com/ryanbdclark/pyowletapi"
    },
    "split_keywords": [
        "owlet",
        " api",
        " baby"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "090e540f5895fd1a534b3998b9964bbddb936aaa6733f3af6a041fcaba3479da",
                "md5": "7c6e547f391f8ac6e9e8b2e5d402cc7a",
                "sha256": "7180eab8e5fb7b274547f83cdb11a7ec609117e42d66de5f14fee9112811b6dd"
            },
            "downloads": -1,
            "filename": "pyowletapi-2024.10.1.tar.gz",
            "has_sig": false,
            "md5_digest": "7c6e547f391f8ac6e9e8b2e5d402cc7a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 11049,
            "upload_time": "2024-10-09T19:02:14",
            "upload_time_iso_8601": "2024-10-09T19:02:14.865645Z",
            "url": "https://files.pythonhosted.org/packages/09/0e/540f5895fd1a534b3998b9964bbddb936aaa6733f3af6a041fcaba3479da/pyowletapi-2024.10.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-09 19:02:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ryanbdclark",
    "github_project": "pyowletapi",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pyowletapi"
}
        
Elapsed time: 0.43688s