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.4.0.tar.gz (16.1 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.4.0-py3-none-any.whl (20.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cherry_etl-0.4.0.tar.gz
Algorithm Hash digest
SHA256 8eff1221604817a76e99980381f2a697fcf5a1c608b08db359d166b53aa5e22b
MD5 27ba4200762aa4643a178d7762902ba9
BLAKE2b-256 1be5769c48a348502904d7b92c05ab2cda962e801cf25314a278280224eeaee3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cherry_etl-0.4.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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 55de20da14d2518939f88bffb9601db4af31ae644f20741083cd530985726d50
MD5 ac40fde7d53a5b67f2f74a6da1ebdee5
BLAKE2b-256 3a9f870f83069c7fdbd712804daf11e5bb7b5ca8db0e38e2ab89ae7a1827c3a4

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