| Crates.io | spiceai |
| lib.rs | spiceai |
| version | 3.0.0 |
| created_at | 2024-03-21 05:27:28.225015+00 |
| updated_at | 2025-07-23 02:17:23.495056+00 |
| description | SDK for Spice.ai, an open-source runtime and platform for building AI-driven software. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1181212 |
| size | 144,421 |
Rust SDK for Spice.ai
Add Spice SDK
cargo add spiceai
Follow the quickstart guide to install and run spice locally
use spiceai::ClientBuilder;
#[tokio::main]
async fn main() {
let client = ClientBuilder::new()
.flight_url("http://localhost:50051")
.build()
.await
.unwrap();
let data = client.query("SELECT trip_distance, total_amount FROM taxi_trips ORDER BY trip_distance DESC LIMIT 10;").await;
}
use spiceai::ClientBuilder;
#[tokio::main]
async fn main() {
let client = ClientBuilder::new()
.api_key("API_KEY")
.use_spiceai_cloud()
.build()
.await
.unwrap();
}
SQL Query
use spiceai::ClientBuilder;
#[tokio::main]
async fn main() {
let client = ClientBuilder::new()
.api_key("API_KEY")
.use_spiceai_cloud()
.build()
.await
.unwrap();
let data = client.query("SELECT * FROM taxi_trips LIMIT 10;").await;
}
Check out our Documentation to learn more about how to use the Rust SDK.