Skip to main content

Library for building blockchain pipelines

Project description

Cherry

PyPI version

Cherry is a python library for building blockchain data pipelines.

It is designed to make building production-ready blockchain data pipelines easy.

Features

  • Don't need SQL or external config files. Only write python. Able to create self-contained python scripts and utilize the dynamic nature of python.
  • High-performance and low-cost proprietary data sources are available without the downside of platform lock-in. Just change two lines to switch between data providers.
  • Prebuilt functionality to decode, validate, transform blockchain data. All implemented in rust for performance. Including UInt256, ethereum hex, solana base58 encoding/decoding functionality, and more.
  • Support for both Ethereum (EVM) and Solana (SVM) based blockchains. More to come.
  • Write data into Clickhouse, Iceberg, Deltalake, DuckDB, Parquet and any other supported platform. Can switch between writers without changing any other part of the pipeline.
  • Schema inference, don't need to manually create and manage database schemas, cherry figures out how it should create the tables so you don't have to.
  • Keep datasets fresh with continuous ingestion.
  • Fully parallelized and optimized architecture. Next batch of data is being fetched while your pre-processing function is running, while the database writes are being executed in parallel. Don't need to hand optimize anything.
  • Write transformations in any Arrow compatible library, polars, pandas, datafusion, duckdb and so on.
  • Prebuilt library of transformations e.g. encode all binary columns to ethereum prefixed-hex format or solana base58 format strings.
  • Prebuilt functionality to implement crash-resistance. Make your pipeline crash resistant so it doesn't lose data and starts from where it left off in case of a crash.

Data providers

Provider Ethereum (EVM) Solana (SVM)
HyperSync
SQD
Yellowstone-GRPC

Supported output formats

  • ClickHouse
  • Iceberg
  • Deltalake
  • DuckDB
  • Arrow Datasets
  • Parquet

Usage examples

Logging

Python code uses the standard logging module of python, so it can be configured according to python docs.

Set RUST_LOG environment variable according to env_logger docs in order to see logs from rust modules.

To run an example with trace level logging for rust modules:

RUST_LOG=trace uv run examples/{example_name}/main.py --provider {sqd or hypersync}

Development

This repo uses uv for development.

  • Format the code with uv run ruff format
  • Lint the code with uv run ruff check
  • Run type checks with uv run pyright

Core libraries we use for ingesting/decoding/validating/transforming blockchain data are implemented in cherry-core repo.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Sponsors

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cherry_etl-0.3.0.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cherry_etl-0.3.0-py3-none-any.whl (20.7 kB view details)

Uploaded Python 3

File details

Details for the file cherry_etl-0.3.0.tar.gz.

File metadata

  • Download URL: cherry_etl-0.3.0.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.6.9

File hashes

Hashes for cherry_etl-0.3.0.tar.gz
Algorithm Hash digest
SHA256 613365a99fd06c8e439fe5357a1aad6d7a74f98e94ca7bcf5b51de498dcb048b
MD5 6f0d7d7210c841ab31b50b773d3448cc
BLAKE2b-256 59013a6c40a0faeb2fb606448e6539d36dbd2a9c35d1b8ae6d488b26315f7aa8

See more details on using hashes here.

File details

Details for the file cherry_etl-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: cherry_etl-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 20.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.6.9

File hashes

Hashes for cherry_etl-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d58094ba1cd348213240931c803ef190d6317c0e9f61e4009ef78a77707f2250
MD5 5dada5d9e60fc5665095a13ade293388
BLAKE2b-256 7bddf376d5caea5c96a29eb7aadb195ec9427319257429b708df75426f8d6dd5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page