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-2.0.0.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-2.0.0.tar.gz.
File metadata
- Download URL: spora_sdk-2.0.0.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 |
0dfcc498d4bccbd8c8060170f23fb5a533c1dbe9a2798c6c0005280294a74686
|
|
| MD5 |
82e72c51de4439c47e746a820a11765b
|
|
| BLAKE2b-256 |
e8761979d455e54edbeafcd8099abe4011d857a49a6ca76cb091c33ed3a3e492
|
File details
Details for the file spora_sdk-2.0.0-py3-none-any.whl.
File metadata
- Download URL: spora_sdk-2.0.0-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 |
582eb8263095d50051e620b2665e315285f094bac3318ccb1c3cbd927c61395f
|
|
| MD5 |
65e6ab56b0bc70e33f833ac1cdce2917
|
|
| BLAKE2b-256 |
055b65a67e11a78e85deb6a5a72d2759b36b04a9c36704c555c0750d905e5117
|