Skip to main content

Timberborn http api wrapper

Project description

Timberborn HTTP API Wrapper

A Python library for interacting with the Timberborn HTTP automation API. Supports both direct API control and webhook-based event handling.

Features

  • Get the state of levers & adapters from timberborn
  • Update the state of levers
  • Receive webhooks and trigger actions

Installation

pip install timberborn-http

Quickstart

1. Direct API Control

from timberborn_http import TimberbornAPI

api = TimberbornAPI("http://localhost:8080")

# Get all levers
levers = api.get_levers()
for lever in levers:
    print(lever.name, lever.state)

# Control a lever
api.switch_on("HTTP Lever 1")
api.set_color("HTTP Lever 1", "ff0000")

2. Webhook Events

from timberborn_http import TimberbornWebhookServer

server = TimberbornWebhookServer(port=8081)

@server.on_event("HTTP Lever 1")
def handle_on(name):
    print(f"{name} turned ON!")

while True:
    pass

More examples & details in the examples folder

Getting Help

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

timberborn_http-0.0.4.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

timberborn_http-0.0.4-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file timberborn_http-0.0.4.tar.gz.

File metadata

  • Download URL: timberborn_http-0.0.4.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for timberborn_http-0.0.4.tar.gz
Algorithm Hash digest
SHA256 247dae14ff2b077dd8d523176fa9aefb509eca3c252f0305527bae17277f9bc5
MD5 109ef08c60ba00ef81bfba299a34b1d1
BLAKE2b-256 14b8ca79363a5506e2ebb9eea61b87e607e34a4d5067f8cd384f07d4f3a8498c

See more details on using hashes here.

File details

Details for the file timberborn_http-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for timberborn_http-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6a08f58faabf1cb6954c2421a87070a60584603bb4c3ab628e4d2115c45c42a5
MD5 7b82e962ce12eef597a02372cedab4b3
BLAKE2b-256 6640a749204f7cbe424e17085710748c75d93c576a71d67fc410c17fbb6163c1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page