When you leave:

Learn how to search and filter your plant catalog
View as Markdown
  • Leave bed as is
  • Put used towels in the washing machine, but don’t start it
  • Lower the shades
  • Toss perishables or freeze and label leftovers
  • Un-plug water heater and hot water circulator
  • Turn off lights + thermostat
  • Return keys + garage opener to lockbox

Using the Plant Search API

1

Get your API key

Create an API key in your dashboard, which you’ll use to authenticate your requests.

Store the key securely and pass it to the SDK either as an environment variable via a .env file, or directly in your app’s configuration.

.env
$PLANT_STORE_API_KEY=your_api_key_here
2

Install the SDK

$pip install plantstore-sdk
>pip install python-dotenv
3

Search for plants

Create a new file named search_plants.py, search_plants.ts, or main.go and add the following code:

1# search_plants.py
2import os
3from dotenv import load_dotenv
4from plantstore import PlantStoreClient
5
6load_dotenv()
7
8client = PlantStoreClient(
9 api_key=os.getenv("PLANT_STORE_API_KEY")
10)
11
12# Search for available plants
13plants = client.plants.search(status="available")
14
15print(f"Found {len(plants)} available plants:")
16for plant in plants[:5]:
17 print(f"- {plant.name} (${plant.price})")
18
19# Search by tags
20beginner_plants = client.plants.search(
21 tags=["beginner-friendly", "low-light"]
22)
23
24print(f"\nBeginner-friendly plants:")
25for plant in beginner_plants[:3]:
26 print(f"- {plant.name}: {', '.join(plant.tags)}")
27
28# Get a specific plant by ID
29plant = client.plants.get(plant_id=plants[0].id)
30print(f"\nPlant details:")
31print(f"Name: {plant.name}")
32print(f"Status: {plant.status}")
33print(f"Tags: {', '.join(plant.tags)}")
4

Execute the code

$python search_plants.py

You should see a list of available plants, beginner-friendly options, and detailed information about a specific plant.