Open Plantbook SDK for Python

Documentation Status PyPI version

This is an SDK to integrate with Open Plantbook API.

More information about Open Plantbook and documentation can be found here. It requires registration and API credentials which can be generated on Open Plantbook website.

See API documentation for details about returned values by the SDK. Discord for support and questions

Installation

pip install openplantbook-sdk

Import or require module

from openplantbook_sdk import OpenPlantBookApi

Usage

Quick example (async):

import asyncio
from openplantbook_sdk import OpenPlantBookApi

async def main():
    api = OpenPlantBookApi("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
    # Retrieve plant details with optional ISO 639-1 language code
    details = await api.async_plant_detail_get("abelia chinensis", lang="de")
    print(details["display_pid"])
    # Search plants
    results = await api.async_plant_search("abelia")
    print(results["count"])

asyncio.run(main())
  • The lang parameter is optional; pass an ISO 639-1 code like “en”, “de”, “es” to localize fields when supported by the API.

See demo.py for a more complete walkthrough.

License

MIT