Skip to content

v1.0.0

Compare
Choose a tag to compare
@github-actions github-actions released this 23 Oct 00:15
· 9 commits to trunk since this release
06ebad7

Announcing spicepy v1.0.0! 🎉

Spice.ai is now generally available! Read the announcement blog post to see how Spice helps developers to build high-performance, highly-available, data and AI-driven applications.

spicepy is the easiest way to query data in Python from Spice.ai over a high-performance Apache Arrow connection, which can be quickly loaded into Pandas data frames for integration into existing data pipelines or Jupyter notebooks.

Get started in 3 steps:

  1. Sign up for a free API key at Spice.ai
  2. Download spicepy with pip install git+https://github.com/spiceai/spicepy@v1.0.0
  3. Import spicepy, create a client and start querying Spice's built-in live-updating web3 data:
import spicepy
client = spicepy.Client('API_KEY')
block_data = client.query('SELECT * FROM eth.recent_blocks LIMIT 10;').read_pandas()

Explore over 100+ built-in, real-time web3 datasets available in Spice.ai!

Firecache

Looking for even higher performance? Enterprise customers can leverage Spice Firecache, a real-time, in-memory SQL cache based on DuckDB that enables developers to cache Spice datasets for high concurrency, blazing fast SQL query up to 10x the performance of general SQL query.

Querying data with Firecache using spicepy is just as easy as replacing client.query with client.fire_query:

import spicepy
client = spicepy.Client('API_KEY')
block_data = client.fire_query('SELECT * FROM eth.recent_blocks LIMIT 10;').read_pandas()

Prices

spicepy also includes access to Spice's pricing data for web3 tokens. Need to get the latest BTC price in dollars? It's as easy as:

client.prices.get_latest("BTC-USDC")

Need to find out the value of BTC at some point in the past? Use client.prices.get() with parameters for the time-period you are interested in:

from datetime import datetime, timedelta

client.prices.get(["BTC-USDC", "ETH-BTC"],
    start=datetime.now() - timedelta(days=7),
    end=datetime.now() - timedelta(days=6),
    granularity=timedelta(hours=12)
)

Have questions or feedback? Contact us

What's Changed

New Contributors

Full Changelog: v0.3.0...v1.0.0