Official Python SDK for the Spora agronomic intelligence API
Project description
Spora Python SDK
Official Python client for the Spora agronomic intelligence API.
Installation
pip install spora-sdk
Quick start
from spora import Spora
client = Spora(api_key="spk_live_your_key_here")
# Search species
species = client.search_species("Rosa", limit=5)
# Get crop requirements
crop = client.get_crop("solanum_lycopersicum")
print(crop["temp_optimal_min"], crop["temp_optimal_max"])
# AI question (paid key)
answer = client.ask(
"When should I irrigate my tomatoes?",
crop="solanum_lycopersicum",
lat=45.4, lon=11.0,
tone="concise",
)
print(answer["response"])
# Batch
results = client.batch([
("weather", {"lat": 45.4, "lon": 11.0, "days": 3}),
("should_water", {"lat": 45.4, "lon": 11.0, "crop": "vitis_vinifera"}),
])
Error handling
from spora import Spora, SporaError
client = Spora(api_key="spk_live_your_key_here")
try:
result = client.ask("Best cover crop for clay soil?")
except SporaError as e:
print(e.status, e.error)
print(client.rate_limit.remaining, "/", client.rate_limit.limit)
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
spora_sdk-0.0.1.tar.gz
(4.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spora_sdk-0.0.1.tar.gz.
File metadata
- Download URL: spora_sdk-0.0.1.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3342ebb1eb07681be5f56c5ca15ae5e43019984d5a9821c3f10c56aa1e7f562
|
|
| MD5 |
88e917722e1ce5f5eef8149f8085dde0
|
|
| BLAKE2b-256 |
7bd22da64fd61829ff85bba6ae193f64e045e1245b91df1a0d9d35fd833203ce
|
File details
Details for the file spora_sdk-0.0.1-py3-none-any.whl.
File metadata
- Download URL: spora_sdk-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b26099366ba4646b5ac8e315f838c78ca935746d5eb429dabf262302244a8cf
|
|
| MD5 |
ca2e1503ebefeba73b8f4f46472a9e43
|
|
| BLAKE2b-256 |
bead3fb362bb8e847956b8f85d35db74da3567b0febb7178cf69ef0826d3bd0d
|