Installation

This page explains how to install dbnomics-toolbox to a Python project.

Prerequisites

  • Python 3.12+

  • Git

  • optional (but recommended): uv

Note

uv is a modern Python project management tool that handles virtual environments and dependencies for you. We recommend using it for a smoother experience, but you can also use pip and venv if you prefer.

In particular, uv:

  • manages the dependencies of the project, updating the pyproject.toml and uv.lock files when you add or remove packages,

  • manages the virtual environment of the project (creation, activation, etc.),

  • allows specifying the version of Python to use for the project, and installing it automatically if not available on the system.

Installation options

Create a new Python project with uv (skip if you already have one):

mkdir my-project
cd my-project
uv init

Install from PyPI

uv add dbnomics-toolbox

Install from source (remote)

cd my-project
uv add git+https://git.nomics.world/dbnomics/dbnomics-toolbox.git

Install from source (local)

mkdir vendor
git clone https://git.nomics.world/dbnomics/dbnomics-toolbox.git
cd ../my-project
uv add --editable ../vendor/dbnomics-toolbox

Create a new Python project with a virtual environment (skip if you already have one):

mkdir my-project
cd my-project
python -m venv .venv
source .venv/bin/activate

Install from PyPI

pip install dbnomics-toolbox

Install from source (remote)

cd my-project
pip install git+https://git.nomics.world/dbnomics/dbnomics-toolbox.git

Install from source (local)

mkdir vendor
git clone https://git.nomics.world/dbnomics/dbnomics-toolbox.git
cd ../my-project
pip install --editable ../vendor/dbnomics-toolbox

Validate the installation

Check that Python can import the package:

cd my-project
uv run python -c "import dbnomics_toolbox; print('OK')"
cd my-project
python -c "import dbnomics_toolbox; print('OK')"

If this command prints OK, your environment is ready.

Next step

Continue with the Tutorial.