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 and adapters from Timberborn
  • Change lever states
  • Receive webhook events and trigger actions
  • Find timberborn instances via zeroconf/mDNS

Installation

pip install timberborn-http

pypi.org/project/timberborn-http

Quickstart

Direct API Control

from timberborn_http import TimberbornAPI

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

# Get all levers
for lever in api.get_levers():
    print(f"Lever {lever.name} is currently {lever.state}")

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

Webhook Events

import time
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:
    time.sleep(1)

Discover instances

from timberborn_http import TimberbornAPI

instances = TimberbornAPI.discover(timeout=3.0)
api = instances[0]

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.6.tar.gz (18.0 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.6-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: timberborn_http-0.0.6.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for timberborn_http-0.0.6.tar.gz
Algorithm Hash digest
SHA256 ad7ef0b990d24dee6628f7541191be6cffcdb3c5ccb46c3531f7c7b1f923d511
MD5 3ce64879e34a2489e13592c96df3313d
BLAKE2b-256 71c939c81b38ccfd36ba35c5a0097ebef76fd539907b60a3d8560a41b889fc44

See more details on using hashes here.

Provenance

The following attestation bundles were made for timberborn_http-0.0.6.tar.gz:

Publisher: deploy.yml on Agroqirax/timberborn-http

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: timberborn_http-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 18.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for timberborn_http-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 79ea78bee6cd49e52cb7731251429f10817f2ce2fed0157237951d8aa788d9bf
MD5 0d9646ca4e8bb475eabf1ca0f4c2f006
BLAKE2b-256 47d2ecac019d001cd25e3ec7089f3da0d04cc93bf7e10b52f6e041509333b078

See more details on using hashes here.

Provenance

The following attestation bundles were made for timberborn_http-0.0.6-py3-none-any.whl:

Publisher: deploy.yml on Agroqirax/timberborn-http

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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