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.1.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.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: openplantbook_sdk-0.6.1.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.1.tar.gz
Algorithm Hash digest
SHA256 388f18f75480de420e267a9d462eed294802d139d6e165101920232fd26406de
MD5 013d7a86852aa9247911ab91695c1587
BLAKE2b-256 3a22a730a564286075ec622c95091118a7c71edbc77efe3599a7087218c8be90

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openplantbook_sdk-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 584c3c80d87251f2b25b233c6339c1f0afb5f42f80576e971ac4352cc9ddcf31
MD5 27f0a4ca9d92ef3b73abf055eb4cbd27
BLAKE2b-256 a87dab72439d60fb05d673ef02f4a976bcea1d45ad10d18538a2223d8a4a28df

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