Installing Dhenara AI
Dhenara AI is available on PyPI and can be installed using pip or uv.
Requirements
-
Python 3.13
Dhenara currently targets Python 3.13 to keep typing, providers, and structured-output support consistent.
Basic Installation
pip install dhenara-ai
This installs the public dhenara-ai package with its provider integrations and typed client surfaces.
Using uv (Recommended)
uv supports two common workflows:
A) You have a project (pyproject.toml)
# (optional) create a new project
uv init
# add dependency to pyproject.toml
uv add dhenara-ai
# create/update .venv and install from the lockfile
uv sync
Run without activating the venv:
uv run python -c "import dhenara.ai as dai; print(dai.__version__)"
B) You just want a quick install into an existing venv
uv pip install dhenara-ai
Using a Virtual Environment (Recommended)
It's best practice to use a virtual environment for Python projects:
# Create a virtual environment
python -m venv .venv
# Activate the environment (Linux/Mac)
source .venv/bin/activate
# Activate the environment (Windows)
.venv\Scripts\activate
# Install Dhenara
pip install dhenara-ai
Using uv:
# Create a virtual environment (creates .venv)
uv venv
# Option 1: activate + use normal python/pip
source .venv/bin/activate
pip install dhenara-ai
# Option 2: don't activate; run/install via uv
uv pip install dhenara-ai
uv run python -c "import dhenara.ai as dai; print(dai.__version__)"
Installing from Source
git clone https://github.com/dhenara/dhenara-ai.git
cd dhenara-ai
# Editable install
pip install -e .
# Or with uv
uv sync --all-extras
Provider-specific Dependencies
Dhenara automatically installs the necessary dependencies for all supported providers.
Provider-specific Requirements
Different AI providers have specific requirements:
- OpenAI: Requires an OpenAI API key
- Google Gemini Developer API: Requires a Gemini API key under the
google_gemini_apiprovider block - Google Vertex AI: Requires service account credentials
- Anthropic: Requires an Anthropic API key
- Microsoft OpenAI: Requires an API key plus an Azure OpenAI or Microsoft Foundry OpenAI v1 endpoint
- Amazon Bedrock: Requires AWS credentials with Bedrock access
For Microsoft-hosted OpenAI-compatible deployments, use the microsoft_openai provider block. The older
microsoft_azure_ai text-generation surface is not the recommended public setup.
Credential Discovery
The recommended public setup uses ResourceConfig and one of these two flows:
- Pass an explicit credentials file path to
ResourceConfig.load_from_file(). - Set
DAI_SECRET_CONFIG_DIRand placedai_credentials.yamlinside that directory.
If DAI_SECRET_CONFIG_DIR is unset, Dhenara AI falls back to /run/secrets/dai/dai_credentials.yaml.
See Resource Configuration for the current credentials-file shape.
Verifying Installation
You can verify your installation with:
import dhenara.ai as dai
print(f"Dhenara version: {dai.__version__}")
Troubleshooting
If you encounter issues with installation:
- Ensure you have the latest pip:
pip install --upgrade pip - Try installing with the
--verboseflag:pip install --verbose dhenara-ai - For provider-specific issues, check that you have the required credentials properly configured
Next Steps
- Continue to Quick Start for your first Dhenara application