Skip to main content

KuzuDB Python API

Project description

pip install from the source

chmod +x package_tar.sh
./package_tar.sh
pip install kuzu.tar.gz    

Note: installing from source requires the full toolchain for building the project, including bazel, OpenJDK, and a compiler compatible with C++20. The package works for both Linux and macOS.

Container for self-hosted manylinux builder

Introduction

The container for manylinux builder automatically builds and upload wheels compatiable with manylinux2014_x86_64 platform tag when it is manually triggered from CI. The spec for manylinux can be found at https://github.com/pypa/manylinux.

Build

docker build -t kuzu-self-hosted-linux-builder .

Start container

docker run  --name self-hosted-linux-builder --detach --restart=always\
            -e GITHUB_ACCESS_TOKEN=YOUR_GITHUB_ACCESS_TOKEN\
            -e MACHINE_NAME=NAME_OF_THE_PHYSICAL_MACHINE kuzu-self-hosted-linux-builder

Note: GITHUB_ACCESS_TOKEN is the account-level access token that can be acquired at GitHub developer settings.

Bulid wheels for macOS

We use cibuildwheel. The configuration file is located at .github/workflows/mac-wheel-workflow.yml. Although we currently run the pipeline on a self-hosted Mac mini, this configuration also works for GitHub-hosted runners (macos-11 and macos-12).

Self-hosted macOS runner setup

The self-hosted runner needs to be properly configured for the pipeline to run. Please follow the instructions below to configure a self-hosted runner on macOS.

  • OS requirement: for support for C++20 and proper cross-compilation for ARM64, Xcode 13+ and macOS 11+ is required. If the hardware does not support macOS 11 officially, consider using OpenCore Legacy Patcher.
  • Machine configurations:
    • Username: The username must be set to runner to be consistent with the GitHub-hosted runners. Otherwise, cibuildwheel configuration step will fail due to writing to directories that does not exist.
    • sudo without password: The runner user needs to have the permission to sudo without password. Otherwise, cibuildwheel will not be able to install Python automatically due to not able to take user input for the password. To enable sudo without password, create a file (with arbitrary name) under /private/etc/sudoers.d/ and add runner ALL = (ALL) NOPASSWD: ALL to it.
    • Keep the machine from going to sleep automatically: under System Preferences > Energy Saver, check "Prevent your Mac from sleeping automatically when the display is off" and uncheck "Put hard disks to sleep when possible".
    • Automatic login: the GitHub self-hosted runner service on macOS is configured for the user space only. For the listener to be back online automatically after each reboot without manually logging in, automatic login should be turned on for runner user. Please follow this instruction to configure it.
    • For the ease of remote management, consider enabling sshd and configure a DDNS service to keep the hostname updated with the correct IP address.
  • Dependencies installation:
    • Xcode toolchain: after installing Xcode, run xcode-select --install to install Xcode Command Line Tools.
    • Homebrew: follow the instructions on brew.sh to install it.
    • Bazel: brew install bazel.
    • OpenJDK-11: Installing bazel via Homebrew should also install it as a dependency automatically. However, For it to be detected by macOS, we need to run sudo ln -sfn /usr/local/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk.
    • Pipx: brew install pipx and pipx ensurepath.
  • Github self-hosted runners configuration: follow this documentation to add the self-hosted runner and this documentation for configuring self-hosted runner as a service.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

kuzu-0.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.4 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

kuzu-0.0.1-cp311-cp311-macosx_11_0_arm64.whl (2.2 MB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

kuzu-0.0.1-cp311-cp311-macosx_10_15_x86_64.whl (2.7 MB view hashes)

Uploaded CPython 3.11 macOS 10.15+ x86-64

kuzu-0.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.4 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

kuzu-0.0.1-cp310-cp310-macosx_11_0_arm64.whl (2.2 MB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

kuzu-0.0.1-cp310-cp310-macosx_10_15_x86_64.whl (2.7 MB view hashes)

Uploaded CPython 3.10 macOS 10.15+ x86-64

kuzu-0.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.4 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

kuzu-0.0.1-cp39-cp39-macosx_11_0_arm64.whl (2.2 MB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

kuzu-0.0.1-cp39-cp39-macosx_10_15_x86_64.whl (2.7 MB view hashes)

Uploaded CPython 3.9 macOS 10.15+ x86-64

kuzu-0.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.4 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

kuzu-0.0.1-cp38-cp38-macosx_11_0_arm64.whl (2.2 MB view hashes)

Uploaded CPython 3.8 macOS 11.0+ ARM64

kuzu-0.0.1-cp38-cp38-macosx_10_15_x86_64.whl (2.7 MB view hashes)

Uploaded CPython 3.8 macOS 10.15+ x86-64

kuzu-0.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.4 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

kuzu-0.0.1-cp37-cp37m-macosx_10_15_x86_64.whl (2.7 MB view hashes)

Uploaded CPython 3.7m macOS 10.15+ x86-64

kuzu-0.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.4 MB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.17+ x86-64

kuzu-0.0.1-cp36-cp36m-macosx_10_15_x86_64.whl (2.7 MB view hashes)

Uploaded CPython 3.6m macOS 10.15+ x86-64

Supported by

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