Skip to main content

cherry-pipelines

This is a collection of pipelines that are built using cherry.

All data is stored in ClickHouse.

Python version

This project is meant to be run with Python 3.12

If you are using uv for development it should pick this up automatically because of the .python-version in the project root.

The docker image is configured to use this version of Python as well.

Running a pipeline

Use the main script to run a pipeline:

uv run scripts/main.py

It takes these parameters as environment variables:

  • CHERRY_PIPELINE_KIND, "evm" or "svm".
  • CHERRY_PIPELINE_NAME, name of the pipeline to run e.g. "erc20_transfers".
  • CHERRY_FROM_BLOCK, specify the block that the indexing should start from. defaults to 0.
  • CHERRY_TO_BLOCK, specify the block that the indexing should stop at. has no default. Indexing waits for new blocks when it reaches the tip of the chain if this argument is left empty.
  • CHERRY_EVM_PROVIDER_KIND, specify which provider to use when indexing evm chains. Can be hypersync or sqd. Has no default and is required when indexing evm.
  • CHERRY_EVM_CHAIN_ID, specify the chain_id when indexing an evm chain. has no default and is required when indexing evm.
  • CHERRY_PROVIDER_BUFFER_SIZE, specify buffering between ingestion - processing - writer. Increasing this parameter might improve performance but can also cause higher memory usage. Defaults to 2.
  • CHERRY_INIT_DB, It runs db setup script instead of the pipeline script if this is set to "true".
  • CLICKHOUSE_HOST, defaults to 127.0.0.1.
  • CLICKHOUSE_PORT, defaults to 8123.
  • CLICKHOUSE_USER, defaults to default.
  • CLICKHOUSE_PASSWORD, defaults to empty string,
  • RUST_LOG as explained in env-logger docs
  • PY_LOG as explained in python logging docs. Defaults to "INFO"

An .env file placed in the project root can be used to define these for development.

Running with docker

We publish a docker image that runs the main script.

Dev Setup

Run the docker-compose file to start a clickhouse instance for development.

docker-compose up -d

Run this to delete the data on disk:

docker-compose down -v

And this to stop the container without deleting the data:

docker-compose down

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
  • Run the tests with uv run pytest

Data Provider

All svm pipelines use SQD.

All evm pipelines are configurable using the CHERRY_EVM_PROVIDER_KIND env variable.

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

Metadata

Release files for cherry-pipelines 0.0.20

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cherry-pipelines 0.0.20
File Size Uploaded
cherry_pipelines-0.0.20.tar.gz 88.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cherry-pipelines 0.0.20
File Interpreter ABI Platform
cherry_pipelines-0.0.20-py3-none-any.whl Python 3 none any Details

Total release size: 119.0 kB

Release files / cherry_pipelines-0.0.20.tar.gz

Download URL cherry_pipelines-0.0.20.tar.gz
Size 88.1 kB
Tags Source
SHA-256 checksum
How to use checksums
efd6eecd98ebeb1c9ddb2e8e0b26ce09cffd590d027ede76a6bb296e3e988e7b
BLAKE2b-256 checksum
How to use checksums
9f37116cbc177e5d7e5313dc92322053a427279532fcfd9b2d33ebddf86a258c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.7.9

Release files / cherry_pipelines-0.0.20-py3-none-any.whl

Download URL cherry_pipelines-0.0.20-py3-none-any.whl
Size 30.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
97da9402873f8b25bd12b4f87df093470983ef88b9eba312574d085d8b431703
BLAKE2b-256 checksum
How to use checksums
73aa7f46b7239e3da249124511da8a0617c59d76ea644a748db16c3a74b5332a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.7.9

Release history Release notifications | RSS feed

This release

0.0.20 This release

2 release files

0.0.19

2 release files

0.0.18

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page