Skip to content
GitHub

Installation

  • Python 3.11 or higher
  • uv (recommended) or pip

Terminal window
# uv (recommended — fast, deterministic)
uv add lexigram
# pip
pip install lexigram

The core lexigram package gives you:

FeatureImportDescription
Applicationfrom lexigram import ApplicationComposition root with lifecycle management
Providerfrom lexigram import ProviderTwo-phase register / boot service wiring
Containerfrom lexigram import ContainerIoC container — singleton, scoped, transient bindings
DI decoratorsfrom lexigram import singleton, injectable, scoped, transientMark classes for auto-registration
LexigramConfigfrom lexigram import LexigramConfigYAML + env vars + profile overlays
Resultfrom lexigram.result import Result, Ok, ErrExplicit error handling with unwrap, map, and_then
modulefrom lexigram import module, Module@module decorator with import/export boundaries

lexigram-contracts (the zero-dependency protocol layer, imported as lexigram.contracts.*) is installed automatically as a dependency of lexigram.


Install only what you need. Every extension depends only on lexigram (core) and lexigram-contracts — never on each other.

Terminal window
uv add lexigram-web

ASGI web layer — controllers, routing, middleware, OpenAPI docs, CORS, CSRF, rate limiting.

Terminal window
uv add lexigram-sql

Async SQL for Postgres / MySQL / SQLite — repositories, migrations, query building.

Terminal window
uv add lexigram-ai lexigram-ai-llm

Multi-provider LLM client and the orchestration layer. Add lexigram-ai-rag, lexigram-ai-agents, and lexigram-vector as needed.


The open-source ecosystem is 35+ extensions across these areas. See The Ecosystem for the full, annotated list.

CategoryPackages
Foundationlexigram, lexigram-contracts
Web & APIlexigram-web, lexigram-http, lexigram-graphql
Data & Persistencelexigram-sql, lexigram-nosql, lexigram-cache, lexigram-storage, lexigram-search, lexigram-vector, lexigram-graph
AIlexigram-ai, lexigram-ai-llm, lexigram-ai-rag, lexigram-ai-agents, lexigram-ai-memory, lexigram-ai-skills, lexigram-ai-session, lexigram-ai-mcp, lexigram-ai-workers, lexigram-ai-feedback
Messaging & Workflowlexigram-events, lexigram-queue, lexigram-notification, lexigram-webhook, lexigram-workflow
Background Worklexigram-tasks
Observability & Reliabilitylexigram-monitor, lexigram-resilience, lexigram-audit, lexigram-ai-observability
Security & Multi-Tenancylexigram-auth, lexigram-tenancy, lexigram-features
Developer Toolinglexigram-cli, lexigram-testing

Terminal window
# CLI — project scaffolding, dev server, migrations
uv add lexigram-cli
# Testing — fakes, test clients, compliance suites
uv add --dev lexigram-testing

With lexigram-cli installed you get the lexigram command:

Terminal window
lexigram new my-app # scaffold a project
lexigram run # auto-detect create_app() and serve
lexigram db upgrade # run migrations

Terminal window
python -c "import lexigram; print(lexigram.__version__)"