Metadata-Version: 2.4
Name: pyowletapi
Version: 2025.4.9
Summary: Owlet baby monitor API wrapper
Home-page: https://github.com/ryanbdclark/pyowletapi
Author: Ryan Clark
Keywords: owlet,api,baby
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.10
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: aiohttp
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# 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
