Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 786 Bytes

README.md

File metadata and controls

32 lines (25 loc) · 786 Bytes

Awair

A python wrapper for Awair private API

Dependencies

  • pytz
  • requests

How to use

from datetime import datetime
from datetime import timedelta

from awair import Awair
from awair.enums import DeviceType

email = 'myId@test.com'
password = 'myStrongPassword!'
device_id = '1234'

start_dt = datetime.now().replace(hour=0, minute=0, second=0, microsecond=0)
end_dt = start_dt + timedelta(days=1)

awair = Awair(email, password)
timelines = awair.get_timelines(DeviceType.AWAIR_MINT, device_id, start_dt, end_dt)
for timeline in timelines:
    print(timeline.timestamp)
    print(timeline.score)

Alternatives