Skip to main content

Wrapper around the (undocumented) SNOO Smart Bassinet API

Project description

SNOO

This is an API client to the SNOO Smart Bassinet. The SNOO is a bassinet that will rock your baby to sleep, and responds to the baby by trying to sooth it with different rocking motions and sounds when it detects crying.

Currently, it supports getting the current session data from SNOO, and historic data. It does not allow you to control the SNOO (the control API is provided by PubNub and is different from the read-only data API hosted by happiestbaby.com)

A word of caution

The SNOO API is undocumented. Using it might or might not violate Happiest Baby, Inc Terms of Service. Use at your own risk.

Usage

Installation

pip install snoo

Command line usage

To get the status of your snoo, simply run

$ snoo

The first time you run it, it will prompt for your username and password. These will be stored in either ~/.snoo_config or ~/.config/snoo/snoo.config, depending on your system. The output of the snoo command is the status (Awake, Asleep, or Soothing), and the duration of the current session.

Programmatic usage

from snoo import Client

client = Client()
# Find out where your config is stored
print(client.config_path)
# Get data from your current session
current_session = client.get_current_session()
# Print the status of the current session.
print(client.status())

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

snoo-0.1.0.tar.gz (4.4 kB view hashes)

Uploaded Source

Built Distribution

snoo-0.1.0-py3-none-any.whl (4.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