ToolBoxV2: Installation Guide¶
This guide provides instructions for installing ToolBoxV2, whether you need just the core Python library or the full-stack application including the Rust server and Tauri/Web frontend.
1. Installing the Core Python Library¶
This method is suitable if you primarily need to use ToolBoxV2 as a Python library within your own projects or want to develop Python-based modules for it.
Option A: Stable Release from PyPI (Recommended)¶
This is the preferred method for installing the latest stable release of the ToolBoxV2 Python package.
-
Ensure you have Python and pip: If you don't have Python and pip installed, this Python installation guide can help. We recommend Python 3.10 or newer.
-
Install ToolBoxV2: Open your terminal or command prompt and run:
Consider using a virtual environment to manage project dependencies:1
pip install ToolBoxV2
1 2 3 4 5 6 7 8
# Create a virtual environment (optional but recommended) python -m venv .venv # Activate it (Windows) # .venv\Scripts\activate # Activate it (macOS/Linux) # source .venv/bin/activate pip install ToolBoxV2
Option B: From Source (Latest Development Version)¶
This method allows you to get the very latest code from the GitHub repository, which might include new features or changes not yet in a stable release.
-
Clone the Repository:
1 2
git clone https://github.com/MarkinHaus/ToolBoxV2.git cd ToolBoxV2
-
Install in Editable Mode: This installs the package from your local clone, and any changes you make to the source code will be immediately reflected in your environment.
- Using pip:
1 2
# Recommended: Activate a virtual environment first pip install -e .
- Using
uv
(a fast Python package installer and resolver):1 2
# Recommended: Activate a virtual environment first uv pip install -e .
- Using the provided script (sets up environment):
This script creates a virtual environment and installs dependencies.
1 2
chmod +x install_python_env.sh ./install_python_env.sh
- Using pip:
Option C: Directly from GitHub with pip¶
You can also install directly from the GitHub repository without cloning it first:
1 |
|
2. Installing the Full Stack Desktop/Web Application¶
This setup is for developers who want to run or develop the complete ToolBoxV2 application, including the Python backend, Rust server (Actix), and the Tauri-based desktop application or tbjs
web frontend.
Prerequisites¶
Ensure you have the following installed on your system:
- Python: Version 3.10 or higher.
- Rust and Cargo: Install from rust-lang.org.
- Node.js and npm/pnpm: Install from nodejs.org. We recommend
pnpm
for managing Node.js dependencies in this project.- Install
pnpm
globally:npm install -g pnpm
- Install
- Tauri CLI: Install using Cargo:
cargo install tauri-cli
Ensure the virtual environment created by the script (or one you created manually) is activated for the subsequent steps.
- Install Node.js Dependencies and Build Rust Components:
From the root of the
ToolBoxV2
directory:The Rust backend (1
pnpm install # Installs Node.js dependencies for tbjs and Tauri frontend
src-core/
) and Tauri components are typically built as part of thepnpm
scripts defined inpackage.json
. If you need to build the Rust core manually:the build step is Usually handled by the api flow1 2
# (Usually not needed if using pnpm scripts) # cargo build --release --manifest-path src-core/Cargo.toml
Running the Application in CLI¶
- Row python runner tb
1
tb -c {MOD_NAME} {FUCTION_NAME} {AGRGS} --kwargs name:value
- or run in ipython
1
tb --ipy
Running the Application in Server mode for web and Desktop¶
Refer to the scripts in the package.json
file for various ways to run and build the application. Common commands include:
-
Web Development Mode (tbjs frontend with hot-reloading):
This typically starts the Rust server and the web frontend development server.1 2
pnpm dev # or live
-
Tauri Desktop Application (Development Mode):
This will build and run the Tauri desktop application with hot-reloading for the frontend.1
pnpm tauri dev
-
Build Tauri Desktop Application (Production):
This creates a distributable binary of the desktop application.1
pnpm tauri build # Or a custom script like `pnpm tauriB` if defined
For more specific build and run commands, please consult the scripts
section in the package.json
file located in the ToolBoxV2
repository root or use the CLI help:
1 2 3 |
|
developing tip use to activate all hooks¶
1 |
|
auto version commit hook add <#> to the commit msg and for auto summary¶
auto tagging of version dev, alpha or release tagging syntax in commit msg¶
- [t:d] for dev
- [t:a] for alpha and
- [t:r] for release
all with auto versioning
pre-commit hook¶
runs Ruff Bandit Safety versions and on
?????????¶
1 |
|