Skip to content

Installation

System Requirements

  • Python 3.8 or later (3.11+ recommended)
  • pip 21.0 or later (for PEP 621 pyproject.toml support)

PrimeStamp uses the following system-level cryptographic libraries, which are installed automatically as Python dependencies:

Dependency Purpose
pynacl Ed25519 signing (libsodium)
cryptography AES-256-GCM, ChaCha20-Poly1305, Argon2id
pydantic Data model validation
blake3 BLAKE3 hashing (optional, needed for BLAKE3 algorithm)

Basic Install

Install the core package from the project directory:

cd primestamp/
pip install -e .

This gives you the core stamping engine, SHA3-256/SHA-256 hashing, Ed25519 signing, and the CLI.

Install with Optional Dependencies

PrimeStamp uses optional dependency groups to keep the base install lightweight. Install what you need:

# All optional dependencies (recommended for full functionality)
pip install -e ".[all]"

# Development tools only (ruff, pytest, mypy, black)
pip install -e ".[dev]"

# UI dependencies (Textual TUI, web dashboard)
pip install -e ".[ui]"

Verify the Installation

After installing, confirm everything works:

# Check the CLI is available
primestamp --help

# Or use the short alias
ps --help

# Check the version
python -c "import primestamp; print(primestamp.__version__)"

You should see the help output listing all available commands.

Optional: BLAKE3 Hashing

If you want to use the BLAKE3 hash algorithm (faster than SHA3-256 for large files), install the blake3 package:

pip install blake3

BLAKE3 is not required. The default algorithm is SHA3-256, which is available in the Python standard library.

Optional: API Server

To run the REST API server, you need uvicorn and fastapi:

pip install uvicorn fastapi

Then start the server:

primestamp serve
# or directly:
uvicorn primestamp.api.server:app --reload

Development Setup

For contributing to PrimeStamp:

# Clone and install in editable mode with dev dependencies
cd primestamp/
pip install -e ".[dev]"

# Run the test suite
pytest primestamp/tests/ -v

# Run with coverage
pytest primestamp/tests/ --cov=primestamp --cov-report=html

# Lint
ruff check .

Skipping slow tests

Some integration tests require network access or take longer to run. Skip them with:

pytest primestamp/tests/ -m "not slow"