Big-O Python SDK
Python SDK for the Big-O LLM Gateway, a 100% OpenAI-compatible API that provides unified access to multiple LLM providers (AWS Bedrock, Azure OpenAI).
Installation
pip install big-o-sdk
With optional framework integrations:
pip install big-o-sdk[llamaindex] # + LlamaIndex LLM and embeddings
pip install big-o-sdk[haystack] # + Haystack embeddings
pip install big-o-sdk[all] # everything
For development:
git clone https://gitlab.com/virtuele-gemeente-assistent/big-o-sdk.git
cd big-o-sdk
uv sync
Configuration
Set credentials as environment variables or in a .env file:
BIG_O_CLIENT_ID=your-client-id
BIG_O_CLIENT_SECRET=your-client-secret
BIG_O_CHAT_MODEL=gpt-4o-mini
BIG_O_EMBEDDING_MODEL=text-embedding-3-large
Quick Start
Framework-agnostic (recommended)
Use BigOTokenProvider to get credentials for any OpenAI-compatible framework:
from big_o_sdk import BigOConfig, BigOTokenProvider
config = BigOConfig.from_env()
provider = BigOTokenProvider(config)
creds = await provider.get_credentials(model="gpt-4o-mini")
# → {"base_url": "https://...", "api_key": "eyJ...", "model": "gpt-4o-mini"}
Use the credentials with any framework:
# LangChain
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(**creds)
# LlamaIndex
from llama_index.llms.openai_like import OpenAILike
llm = OpenAILike(**creds)
# Agno
from agno.models.openai import OpenAIChat
llm = OpenAIChat(**creds)
# Raw OpenAI SDK
from openai import AsyncOpenAI
client = AsyncOpenAI(base_url=creds["base_url"], api_key=creds["api_key"])
Lightweight completions (no framework needed)
from big_o_sdk import BigOConfig, BigOClient
config = BigOConfig.from_env()
async with BigOClient(config) as client:
answer = await client.complete("Say hello", model="gpt-4o-mini")
print(answer)
LlamaIndex (optional)
pip install big-o-sdk[llamaindex]
from big_o_sdk import BigOConfig, BigOLLM
config = BigOConfig.from_env()
llm = BigOLLM(config)
response = await llm.acomplete("Hello!")
await llm.close()
Haystack embeddings (optional)
pip install big-o-sdk[haystack]
from big_o_sdk import BigOConfig
from big_o_sdk.embedders.haystack import BigOTextEmbedder
config = BigOConfig.from_env()
embedder = BigOTextEmbedder(config)
result = embedder.run(text="What is AI?")
Gateway status
from big_o_sdk import BigOConfig, BigOClient
config = BigOConfig.from_env()
async with BigOClient(config) as client:
await client.health()
await client.ping()
models = await client.models()
BigOConfig
| Environment Variable | Default |
|---|---|
BIG_O_CLIENT_ID |
(required) |
BIG_O_CLIENT_SECRET |
(required) |
BIG_O_BASE_URL |
https://devops.versnellers.nl/bigo/api |
BIG_O_CHAT_MODEL |
gpt-4o-mini |
BIG_O_EMBEDDING_MODEL |
text-embedding-3-large |
BIG_O_CONTEXT_WINDOW |
128000 |
Authentication
JWT tokens are managed automatically:
- Fetch token via OAuth2 Client Credentials
- Cache and refresh 30 seconds before expiry
- Pass transparently to the underlying client
Architecture
big_o_sdk core (always available, <1s startup)
├── BigOConfig Configuration and credentials
├── BigOClient Lightweight completions, chat, health, models
├── BigOTokenProvider Fresh JWT tokens for any framework
├── BigOAuthenticator OAuth2 token lifecycle
└── errors Domain-specific exceptions
big_o_sdk[llamaindex] (optional)
├── BigOLLM LlamaIndex LLM wrapper
└── BigOEmbedding LlamaIndex embedding wrapper
big_o_sdk[haystack] (optional)
├── BigOTextEmbedder Haystack text embedder
└── BigODocumentEmbedder Haystack document embedder
Project Structure
src/big_o_sdk/
├── config.py BigOConfig
├── errors.py Domain exceptions
├── auth.py BigOAuthenticator
├── client.py BigOClient (complete, chat, health, models)
├── token_provider.py BigOTokenProvider
├── mixins.py Shared token refresh logic
├── agents/
│ └── llamaindex.py BigOLLM
└── embedders/
├── llamaindex.py BigOEmbedding
└── haystack.py BigOTextEmbedder, BigODocumentEmbedder
Related Projects
- ai-orchestration: RAG chatbot using LlamaIndex agents and Haystack embeddings
- scrapy: Web scraper with Haystack document indexing and hybrid search
License
EUPL v1.2, see LICENSE for details.
Metadata
Release files for big-o-sdk 1.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| big_o_sdk-1.2.3.tar.gz | 28.1 kB | Without provenance | Details for big_o_sdk-1.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| big_o_sdk-1.2.3-py3-none-any.whl | Python 3 | none | any | Details for big_o_sdk-1.2.3-py3-none-any.whl |
Total release size: 54.3 kB
Release files / big_o_sdk-1.2.3.tar.gz
| Download URL | big_o_sdk-1.2.3.tar.gz |
|---|---|
| Size | 28.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aea4d3a1083735a1463baef437f74ab6a380fc1b56737d92407d0393c5f9fe8b
|
|
BLAKE2b-256 checksum How to use checksums |
f71b011fa0e1270b8b72f893ea6aca055194e5f78ae935427e89b2291d7fd1e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.12
|
Release files / big_o_sdk-1.2.3-py3-none-any.whl
| Download URL | big_o_sdk-1.2.3-py3-none-any.whl |
|---|---|
| Size | 26.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b28745dbf2559017304b419da5a61204698aa4f685c45f9de57c3491d53a91b9
|
|
BLAKE2b-256 checksum How to use checksums |
f7a827c6aa00c70b1b10a49b306e5ae46f47683773d262d58d5cd833d13d29d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.12
|
Security for big-o-sdk 1.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.