Build from Source
Before building the package from source, make sure that you have installed the listed dependencies below:
- python3 virtualenv
- git
- GCC
- pkg-config
- cmake
- protoc (protobuf compiler) >= v3.20.0
- openssl
- openssl-dev
- rustup
- ziglang and zigbuild (for GNU Linux only)
- valkey (for testing)
Valkey installation
Section titled “Valkey installation”See the Valkey installation guide to install the Valkey server and CLI.
Dependencies installation
Section titled “Dependencies installation”-
Install common prerequisites
Section titled “Install common prerequisites”Terminal window sudo apt update -ysudo apt install -y git gcc pkg-config openssl libssl-dev unzip cmake python3# Install rustcurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shsource "$HOME/.cargo/env"# Check that the Rust compiler is installedrustc --versionInstall
Section titled “Install ziglang and zigbuild”ziglangandzigbuildTerminal window pip3 install ziglangcargo install --locked cargo-zigbuildTerminal window sudo yum update -ysudo yum install -y git gcc pkgconfig openssl openssl-devel unzip cmake wget tar python3# Install rustcurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shsource "$HOME/.cargo/env"# Check that the Rust compiler is installedrustc --versionInstall
Section titled “Install ziglang and zigbuild”ziglangandzigbuildTerminal window pip3 install ziglangcargo install --locked cargo-zigbuildTerminal window brew updatebrew install git gcc pkgconfig openssl cmake unzip python3# Install rustcurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shsource "$HOME/.cargo/env"# Check that the Rust compiler is installedrustc --versionInstall Protobuf Compiler
Section titled “Install Protobuf Compiler”Terminal window PB_REL="https://github.com/protocolbuffers/protobuf/releases"curl -LO $PB_REL/download/v29.1/protoc-29.1-linux-x86_64.zipunzip protoc-29.1-linux-x86_64.zip -d $HOME/.localexport PATH="$PATH:$HOME/.local/bin"protoc --versionTerminal window PB_REL="https://github.com/protocolbuffers/protobuf/releases"curl -LO $PB_REL/download/v29.1/protoc-29.1-linux-x86_64.zipunzip protoc-29.1-linux-x86_64.zip -d $HOME/.localexport PATH="$PATH:$HOME/.local/bin"protoc --versionTerminal window PB_REL="https://github.com/protocolbuffers/protobuf/releases"curl -LO $PB_REL/download/v29.1//protoc-29.1-osx-universal_binary.zipunzip protoc-29.1-osx-universal_binary.zip -d $HOME/.localexport PATH="$PATH:$HOME/.local/bin"protoc --versionOther platform-specific binaries can be found here.
-
Clone the repository
Section titled “Clone the repository”Terminal window mkdir -p $HOME/srccd $HOME/srcgit clone https://github.com/valkey-io/valkey-glide.gitcd valkey-glide -
Build the client
Section titled “Build the client”You can build the async Python client using the
dev.pyCLI utility found in thepython/project directory. It handles environment setup, dependency installation, and consistent build logic.Terminal window cd python/python3 dev.py --helpExamples:
Section titled “Examples:”Terminal window # Build the async client in release modepython3 dev.py build --client async --mode release- Use
--mode debug(default) when developing or debugging. - Use
--mode releasewhen measuring performance or preparing production builds.
- Use