Skip to content

vrachieru/huahuacaocao-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Version Version
HuaHuaCaoCao (Xiaomi Flower Care) API wrapper

Features

  • Find plant by name
  • Get plant description and care information

Install

$ pip3 install git+https://github.com/vrachieru/huahuacaocao-api.git

or

$ git clone https://github.com/vrachieru/huahuacaocao-api.git
$ pip3 install ./huahuacaocao-api

Usage

Get plant information

import json
import huahuacaocao

hhcc = huahuacaocao.HuaHuaCaoCao()

json.dump(hhcc.get_plant_details('carmona microphylla'), sys.stdout, indent=4)
$ python3 plant_details.py

{
    "pid": "carmona microphylla",
    "basic": {
        "floral_language": "",
        "origin": "Tropical areas",
        "production": "China",
        "category": "Boraginaceae, Carmona",
        "blooming": "Flowering period May-July, fruiting period August-October",
        "color": "Flower color white"
    },
    "display_pid": "Carmona microphylla",
    "maintenance": {
        "size": "Diameter \u2265 10 cm, height \u2265 10 cm",
        "soil": "Loose, fertile, and well-drained acid soil",
        "sunlight": "Like bright scattered sunlight, strong resistant to shade",
        "watering": "Water thoroughly when soil is dry, avoid saturated water",
        "fertilization": "Apply enough base fertilizers",
        "pruning": "Remove dead and diseased branches timely, strong ability to sprout"
    },
    "parameter": {
        "max_light_mmol": 5400,
        "min_light_mmol": 1800,
        "max_light_lux": 55000,
        "min_light_lux": 2000,
        "max_temp": 35,
        "min_temp": 5,
        "max_env_humid": 80,
        "min_env_humid": 30,
        "max_soil_moist": 60,
        "min_soil_moist": 20,
        "max_soil_ec": 2000,
        "min_soil_ec": 100
    },
    "image": "http://pkb.resource.huahuacaocao.com/Y2FybW9uYSBtaWNyb3BoeWxsYS5qcGc=?imageView2/1/w/%d/h/%d"
}

License

MIT