Skip to main content

Open Plantbook SDK for Python

Project description

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

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

openplantbook_sdk-0.6.0.tar.gz (22.0 kB view details)

Uploaded Source

Built Distribution

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

openplantbook_sdk-0.6.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file openplantbook_sdk-0.6.0.tar.gz.

File metadata

  • Download URL: openplantbook_sdk-0.6.0.tar.gz
  • Upload date:
  • Size: 22.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for openplantbook_sdk-0.6.0.tar.gz
Algorithm Hash digest
SHA256 a836c2d2d90f8c5811dd5d7d924d874ca68e06013229245c15c8954cf42ff552
MD5 3509be7ea2e802e5f46569269357fc81
BLAKE2b-256 0024b40791efc9b7f149536a76e9106f04cdfe9b891a5128c01e93a34a9d153b

See more details on using hashes here.

File details

Details for the file openplantbook_sdk-0.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for openplantbook_sdk-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dce9359dbbdccad919792b7cf104653686e465dc6e6c6c44a8ef7b6a50b1f186
MD5 5a3daac1d95bc62a454402e78aa3161f
BLAKE2b-256 8b830423f7ab403d474be1992cbc14d5b76005d7ade5af0a424df6bb8433e55c

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