Skip to content

bartcode/slide-api-client

Repository files navigation

GitHub Actions GitHub Activity GitHub Last Commit

GitHub Stars GitHub Watchers GitHub Forks

Slide API client

Python API client to utilise the Slide Cloud or local API.

Usage

Cloud API

import asyncio
from slide import SlideCloud, get_slides

slide = SlideCloud(username="email@address.com", password="some-password")
slides = asyncio.run(get_slides(slide=slide))
print(f"Found slides: {','.join([s.device_name for s in slides])}")

Local API

import asyncio
from slide import SlideCloud, get_slide_state

slide = SlideCloud(base_url="http://192.168.1.10", device_code="some-device-code")
slide_state = asyncio.run(get_slide_state(slide=slide))
print(f"Got slide state: {slide_state}")

Environment variables

Instead of providing explicit values for username/password or device code, you could also set environment variables. The used environment variables are listed and described below.

Key Description
SLIDE_API_USERNAME Username when using the Slide Cloud API
SLIDE_API_PASSWORD Password when using the Slide Cloud API
SLIDE_API_DEVICE_CODE Device code when using the local Slide API

Installation

pip install slide-api-client

About

Python library to communicate with the Slide API.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages