Skip to content

Latest commit

 

History

History
76 lines (54 loc) · 1.74 KB

File metadata and controls

76 lines (54 loc) · 1.74 KB

hypersync-client-python

Python package for Envio's HyperSync client written in Rust

Setup

Recommeded to use a venv to install the package.

python -m venv .venv

Then activate the venv before use.

source .venv/bin/activate

Then install the packages with pip.

pip install -e .

Examples (examples/)

The examples/ folder contains a set of examples you can explore. Before running any example, install the required dependencies with:

pip install -e .[examples]

Next, add your HyperSync token to the .env file. You can then run an example using:

python examples/<example>.py

Troubleshooting

HyperSync Installation Issues

If you encounter build errors when installing hypersync, ensure Rust and system dependencies are installed.

Ubuntu/Debian:

# Install all required dependencies
sudo apt-get update
sudo apt-get install build-essential capnproto libcapnp-dev

# Install Rust (if not already installed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env

macOS:

# Install Xcode command line tools
xcode-select --install

# Install Cap'n Proto via Homebrew
brew install capnp

# Install Rust (if not already installed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env

Then install hypersync:

pip install --no-cache-dir --use-pep517 "hypersync==0.8.5"

Common errors:

  • "cargo not found": Install Rust toolchain
  • "capnp: No such file or directory": Install Cap'n Proto (apt-get install capnproto libcapnp-dev on Ubuntu, brew install capnp on macOS)
  • Build fails on Linux: Install build essentials: apt-get install build-essential