Skip to main content

A library to query data about a Bird Buddy smart bird feeder

Project description

pybirdbuddy

import asyncio
import pprint

from birdbuddy.client import BirdBuddy

bb = BirdBuddy("user@email.com", "Pa$$w0rd")

# Using coroutines with async/await:
async def async_test():
    await bb.refresh()
    pprint.pprint(bb.feeders)

# Without async/await, including from a top-level module:
result = asyncio.run(bb.refresh())
pprint.pprint(result)
pprint.pprint(bb.feeders)

Note: only password login is supported currently. Google and other SSOs are not supported. If you've already set up your Bird Buddy with SSO, one option could be to register a new account with a password, and then redeem an invite code to your Bird Buddy under the new account. Some fields will be missing (such as firmware versions and off-grid status).

The feeders property will be an array of feeders with the following fields:

fragment ListFeederFields on FeederForPrivate {
  battery {
    charging    # Boolean
    percentage  # Int (93)
    state       # String (enum: "HIGH")
  }
  food {
    state       # String (enum: "LOW")
  }
  id            # String (UUID)
  name          # String
  signal {
    state       # String (enum: "HIGH")
    value       # Int (rssi: -41)
  }
  state         # String (enum: "READY_TO_STREAM")
  temperature {
    value       # Int
  }
}

Translations

API responses can return translated strings by setting the client's language_code property. Language codes are parsed using langcodes

from birdbuddy import BirdBuddy

async def main():
    bb = BirdBuddy
    bb.language_code = "de"
    
    collections = await bb.refresh_collections()
    birds = [c.species.name for c in collections.values()]
    print(birds)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

pybirdbuddy-0.0.20-py3-none-any.whl (28.9 kB view details)

Uploaded Python 3

File details

Details for the file pybirdbuddy-0.0.20-py3-none-any.whl.

File metadata

  • Download URL: pybirdbuddy-0.0.20-py3-none-any.whl
  • Upload date:
  • Size: 28.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for pybirdbuddy-0.0.20-py3-none-any.whl
Algorithm Hash digest
SHA256 ae4c93fbd50fa891a72a7a0ace6b916f19295e517b00fc88d144926ce92926cc
MD5 dbec1e740a631e5d68f41d6129603984
BLAKE2b-256 77a0a85102a50c0344352610f1979fdbd2b2fa9855e615f54fcde6c0f2010ada

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