Skip to main content

A Python library for interacting with the Noonlight API

Project description

noonlight-py

Asynchronous Noonlight API client for Python (based on the API documented here)

Usage

>>> import noonlight

# Initialize the client with your token from completing an OAuth2 flow 
#    with Noonlight (and optionally your aiohttp session and timeout)

>>> client = noonlight.NoonlightClient(token = "my_api_token_from_noonlight")

# Create an alarm object using the body parameters documented here:
#   https://docs.noonlight.com/reference#create-alarm

>>> alarm = await client.create_alarm(body = {'location.coordinates': {'lat':38.897957, 'lng':‎-77.036560, 'accuracy': 5} } )

# Check alarm status

>>> print(alarm.status)

# Cancel alarm

>>> cancelled = await alarm.cancel()

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

noonlight-0.1.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

noonlight-0.1.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file noonlight-0.1.1.tar.gz.

File metadata

  • Download URL: noonlight-0.1.1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.6.4

File hashes

Hashes for noonlight-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c4869b985820967e12735d168fe32785d1553a07e6dd01365996050fd66a9b7f
MD5 15f89727d7e81658cc2bb691f8a752c1
BLAKE2b-256 94a22d14b9b2ee233281bbb468f4550f5b0263152dc9b9477c16d68eed28f82b

See more details on using hashes here.

File details

Details for the file noonlight-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: noonlight-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.6.4

File hashes

Hashes for noonlight-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ea8a8a497f6c96fdaddfd70addc55e3f41ce0f2f642e28bb4553878b11ab5442
MD5 e71fe2a5633fc9224c9d290e772b9327
BLAKE2b-256 c788ad15e76ce1105cd5e5f796536b5139d6a734d792ac410670e21e2e308b2b

See more details on using hashes here.

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