Skip to content

Installation

beacon ships as abi3 wheels: one wheel per platform covers every supported Python version, and you don’t need a Rust toolchain.

Terminal window
pip install llm-beacon

Check it works:

>>> import beacon
>>> beacon.__version__
'0.1.0'
>>> beacon.extract_json('Sure! {"ok": true}')
{'ok': True}
Supported
Python 3.10, 3.11, 3.12, 3.13, 3.14 (CPython)
Operating systems Linux (x86_64, aarch64, glibc and musl), macOS (Apple silicon, Intel), Windows (x64)
Runtime dependencies none

The integrations import their framework lazily, so import beacon never pulls in LangChain or anything else. Install the extras you need:

Terminal window
pip install "llm-beacon[openai]" # OpenAI SDK helpers (optional, the helpers are duck-typed)
pip install "llm-beacon[langchain]" # langchain-core
pip install "llm-beacon[llamaindex]" # llama-index-core
pip install "llm-beacon[pydantic-ai]" # pydantic-ai
pip install "llm-beacon[dspy]" # dspy
pip install "llm-beacon[test]" # pytest + pyyaml for the test suite
  1. Install Rust (stable) and maturin:

    Terminal window
    pip install maturin
  2. Clone the repository and build into a virtual environment:

    Terminal window
    git clone https://github.com/IND-Anshuman/beacon.git
    cd beacon
    python -m venv .venv && . .venv/bin/activate
    maturin develop --release
  3. Run the test suites:

    Terminal window
    pytest # Python + snapshot tests
    cargo test --no-default-features # Rust core, no Python needed