Skip to main content

Python SDK for the Kailash container-node architecture

Project description

Kailash Python SDK

PyPI version Python versions Downloads MIT License Code style: black Tests: 2400+ Passing Performance: 11x Faster Docker: Integrated AI: MCP Validated

Enterprise-Grade Workflow Orchestration Platform

Build production-ready applications with zero-config database operations, multi-channel platforms, and comprehensive AI integration. From rapid prototyping to enterprise deployment.


๐Ÿ”ฅ Latest Release: v0.8.1 (January 17, 2025)

Complete App Framework & PyPI Integration

  • ๐Ÿš€ Complete App Framework: DataFlow, Nexus, AI Registry, and User Management platforms
  • ๐Ÿ“ฆ PyPI Integration: All packages available with proper extras support
  • ๐Ÿข Enterprise Ready: Zero-config database operations and multi-channel deployment
  • โšก Performance Breakthrough: 11x faster test execution with 100% pass rate
  • ๐Ÿงช Testing Excellence: 2,400+ tests with comprehensive Docker integration

Full Changelog | PyPI Packages

๐ŸŽฏ What Makes Kailash Different

๐Ÿ—๏ธ Complete Application Framework

Not just a toolkit - complete production-ready applications built on enterprise-grade infrastructure:

  • DataFlow: Zero-config database operations with MongoDB-style queries
  • Nexus: Multi-channel platform (API + CLI + MCP) from single codebase
  • AI Registry: Advanced RAG with 47+ specialized nodes
  • User Management: Enterprise RBAC system with comprehensive security

๐Ÿš€ Performance & Scale

  • 11x faster test execution (117s โ†’ 10.75s) with smart isolation
  • 31.8M operations/second query performance baseline
  • 30,000+ iterations/second cyclic workflow execution
  • 100% test pass rate across 2,400+ tests

๐Ÿค– AI-First Architecture

  • Real MCP execution by default for all AI agents
  • 47+ specialized RAG nodes for document processing
  • Self-organizing agent pools with intelligent coordination
  • Complete LLM integration across all platforms

๐Ÿ—๏ธ Project Architecture

Three-Layer Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                     ๐ŸŽจ Studio UI Layer                         โ”‚
โ”‚              Visual workflow builder (coming soon)              โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                  โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                  ๐Ÿข Application Framework                       โ”‚
โ”‚  DataFlow  โ”‚  Nexus  โ”‚  AI Registry  โ”‚  User Management  โ”‚...  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                  โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                     ๐ŸŽฏ Core SDK Foundation                      โ”‚
โ”‚  115+ Nodes  โ”‚  Workflows  โ”‚  Runtime  โ”‚  Security  โ”‚  Testing โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Current Project Structure

kailash_python_sdk/
โ”œโ”€โ”€ src/kailash/          # Core SDK - 115+ nodes, workflows, runtime
โ”œโ”€โ”€ apps/                 # Complete Applications
โ”‚   โ”œโ”€โ”€ kailash-dataflow/ # Zero-config database operations
โ”‚   โ”œโ”€โ”€ kailash-nexus/    # Multi-channel platform
โ”‚   โ”œโ”€โ”€ kailash-mcp/      # Enterprise MCP platform
โ”‚   โ”œโ”€โ”€ ai_registry/      # Advanced RAG capabilities
โ”‚   โ””โ”€โ”€ user_management/  # Enterprise RBAC system
โ”œโ”€โ”€ tests/               # 2,400+ tests (100% pass rate)
โ”œโ”€โ”€ docs/                # Comprehensive documentation
โ””โ”€โ”€ examples/            # Feature validation examples

๐Ÿš€ Quick Start

Installation Options

# Core SDK only
pip install kailash

# With complete app frameworks
pip install kailash[dataflow,nexus]  # Database + multi-channel
pip install kailash[all]             # Everything

# Or install apps directly
pip install kailash-dataflow  # Zero-config database framework
pip install kailash-nexus     # Multi-channel platform

DataFlow: Zero-Config Database Operations

from dataflow import DataFlow

# Zero-configuration database operations
app = DataFlow()

# MongoDB-style queries across any database
users = app.query("users").where({"age": {"$gt": 18}}).limit(10)

# Redis-powered caching with smart invalidation
cached_result = app.cache().get("user_stats",
    lambda: app.query("users").aggregate([
        {"$group": {"_id": "$department", "count": {"$sum": 1}}}
    ])
)

# Start enterprise API server
app.start()  # Automatic API generation, monitoring, health checks

Nexus: Multi-Channel Platform

from nexus import Nexus

# Single codebase โ†’ API + CLI + MCP
app = Nexus()

# Register workflow once, available on all channels
@app.workflow
def process_data(input_data):
    return {"processed": len(input_data)}

# Zero-config startup
app.start()

# Now available as:
# - REST API: POST /workflows/process_data
# - CLI: nexus run process_data
# - MCP: AI agents can call process_data tool

Core SDK: Advanced Workflows

from kailash.workflow.builder import WorkflowBuilder
from kailash.runtime.local import LocalRuntime

# Build enterprise workflow
workflow = WorkflowBuilder()
workflow.add_node("LLMAgentNode", "ai_agent", {
    "model": "gpt-4",
    "use_real_mcp": True  # Real MCP execution by default
})
workflow.add_node("AsyncSQLDatabaseNode", "database", {
    "connection_string": "postgresql://...",
    "query": "SELECT * FROM customers WHERE risk_score > $1",
    "parameter_types": ["DECIMAL"]  # PostgreSQL type inference
})

# Add cyclic optimization
cycle = workflow.create_cycle("optimization")
cycle.connect("processor", "evaluator") \
     .connect("evaluator", "processor") \
     .max_iterations(50) \
     .converge_when("quality > 0.95") \
     .build()

# Execute with enterprise monitoring
runtime = LocalRuntime()
results, run_id = runtime.execute(workflow.build())

๐ŸŽฏ Key Features

๐Ÿงช Testing Excellence

  • 2,400+ tests with 100% pass rate
  • 11x performance improvement (117s โ†’ 10.75s execution)
  • Docker integration for real PostgreSQL, Redis, MongoDB
  • Smart isolation without process forking overhead

๐Ÿข Enterprise Ready

  • Multi-tenant architecture with complete isolation
  • RBAC/ABAC security with fine-grained permissions
  • Audit logging with compliance frameworks (GDPR, CCPA)
  • Distributed transactions with Saga/2PC patterns
  • Circuit breaker and resilience patterns

๐Ÿค– AI Integration

  • 115+ production nodes including 47+ specialized RAG nodes
  • Real MCP execution by default for all AI agents
  • Self-organizing agent pools with intelligent coordination
  • Complete LLM integration with embeddings and vector search

โšก Performance & Scale

  • 31.8M operations/second query performance baseline
  • Connection pooling with automatic resource management
  • Redis caching with intelligent invalidation patterns
  • Async/await throughout with proper separation

๐Ÿ—๏ธ Node Ecosystem (115+ Nodes)

Core Categories

  • Data Nodes: CSVReaderNode, AsyncSQLDatabaseNode, QueryBuilderNode, QueryCacheNode
  • AI Nodes: LLMAgentNode, IterativeLLMAgentNode, EmbeddingGeneratorNode, SelfOrganizingAgentNode
  • RAG Nodes: 47+ specialized nodes for document processing and retrieval
  • Security Nodes: ThreatDetectionNode, AuditLogNode, AccessControlManager
  • Monitoring Nodes: TransactionMetricsNode, DeadlockDetectorNode, PerformanceAnomalyNode
  • Transaction Nodes: DistributedTransactionManagerNode, SagaCoordinatorNode

Advanced Features

  • Cyclic Workflows: CycleBuilder API with convergence detection
  • Distributed Transactions: Automatic Saga/2PC pattern selection
  • Real-time Monitoring: WebSocket streaming with performance metrics
  • Enterprise Security: Multi-factor auth, threat detection, compliance

๐Ÿ“Š Performance Metrics

Recent Achievements

  • 11x faster test execution: 117s โ†’ 10.75s with smart isolation
  • 100% test pass rate: 2,400+ tests across all categories
  • 31.8M operations/second: Query performance baseline
  • 30,000+ iterations/second: Cyclic workflow execution

Enterprise Benchmarks

  • Query Cache: 99.9% hit rate with intelligent invalidation
  • Connection Pooling: 10,000+ concurrent connections
  • MCP Integration: 407 tests with 100% pass rate
  • Security: Zero vulnerabilities in production deployment

๐Ÿš€ Applications Built with Kailash

1. DataFlow - Zero-Config Database Platform

pip install kailash-dataflow
  • MongoDB-style queries across PostgreSQL, MySQL, SQLite
  • Redis caching with enterprise-grade invalidation
  • Automatic API generation with OpenAPI documentation
  • 4 production examples with complete deployment guides

2. Nexus - Multi-Channel Platform

pip install kailash-nexus
  • Unified API, CLI, and MCP from single codebase
  • Enterprise orchestration with multi-tenancy
  • Session management with cross-channel synchronization
  • 105 tests with comprehensive validation

3. AI Registry - Advanced RAG Platform

pip install kailash-ai-registry
  • 47+ specialized RAG nodes for document processing
  • Advanced retrieval with semantic search and re-ranking
  • Multi-modal support with image and text processing
  • Enterprise deployment with scalable architecture

4. User Management - Enterprise RBAC

pip install kailash-user-management
  • Complete RBAC system with role hierarchy
  • Multi-factor authentication with enterprise integration
  • Audit logging with compliance frameworks
  • Django-style capabilities built on SDK architecture

๐Ÿงช Testing & Quality

Comprehensive Test Suite

# All tests (2,400+ tests)
pytest

# Fast unit tests (11x faster execution)
pytest tests/unit/ --timeout=1

# Integration tests with Docker
pytest tests/integration/ --timeout=5

# End-to-end scenarios
pytest tests/e2e/ --timeout=10

Test Infrastructure

  • Docker Integration: Real PostgreSQL, Redis, MongoDB for testing
  • Smart Isolation: Fixture-based isolation without process forking
  • Performance Monitoring: Automated benchmarks and regression detection
  • 100% Pass Rate: Comprehensive fixes across all test categories

๐Ÿ›ก๏ธ Security & Compliance

Enterprise Security

  • Multi-factor Authentication: TOTP, WebAuthn, SMS integration
  • Threat Detection: Real-time analysis with behavior monitoring
  • Access Control: Fine-grained RBAC/ABAC with policy engines
  • Audit Logging: Comprehensive trails with integrity verification

Compliance Frameworks

  • GDPR/CCPA: Built-in data protection and privacy controls
  • SOX: Financial reporting controls and audit trails
  • HIPAA: Healthcare data protection patterns
  • Multi-tenant Isolation: Complete tenant-aware operations

๐Ÿ“š Documentation & Resources

For Users

For Contributors

Quick References

๐Ÿšข Production Deployment

Container Deployment

# Export workflow to container format
python -c "
from kailash.utils.export import export_workflow
export_workflow(workflow, 'production.yaml', format='kailash')
"

# Deploy to Kailash platform
kailash deploy production.yaml --environment prod

Monitoring & Observability

from kailash.visualization import DashboardServer

# Real-time monitoring dashboard
server = DashboardServer(port=8080)
server.start()
# Open http://localhost:8080 for live metrics

Enterprise Features

  • Multi-tenant deployment with complete isolation
  • Distributed transactions with automatic recovery
  • Circuit breaker patterns for resilience
  • Health monitoring with automated alerting

๐Ÿค Contributing

We use a Claude Code-driven workflow for all development:

New Team Member?

Start Here โ†’ NEW_TEAM_MEMBER.md

Development Workflow

# Clone and setup
git clone https://github.com/integrum/kailash-python-sdk.git
cd kailash-python-sdk
uv sync

# Run tests (2,400+ tests)
pytest tests/unit/ --timeout=1      # Fast unit tests
pytest tests/integration/ --timeout=5  # Integration tests
pytest tests/e2e/ --timeout=10     # End-to-end tests

# Code quality
black .
isort .
ruff check .

Claude Code Workflow

All project management through conversational AI:

  • No manual TODO editing - Claude Code handles all updates
  • No direct GitHub issues - Created through planning sessions
  • All progress tracked - Through natural conversation

See Contributing Guide and sdk-contributors/CLAUDE.md.

๐Ÿ“ˆ Project Status

โœ… v0.8.1 - Complete App Framework

  • Complete Application Framework: DataFlow, Nexus, AI Registry, User Management
  • PyPI Integration: All packages available with proper extras support
  • Performance Breakthrough: 11x faster test execution
  • Testing Excellence: 2,400+ tests with 100% pass rate
  • Enterprise Ready: Production deployment patterns

โœ… v0.7.0 - Major Framework Release

  • DataFlow Platform: Zero-config database operations
  • Nexus Platform: Multi-channel orchestration
  • AI Registry: Advanced RAG capabilities
  • User Management: Enterprise RBAC system
  • Testing Infrastructure: Docker integration, comprehensive validation

๐Ÿšง Roadmap

  • Visual Workflow Builder: Studio UI for drag-and-drop workflow creation
  • Advanced Analytics: ML-powered workflow optimization
  • Cloud Integration: Native AWS/GCP/Azure deployment
  • Mobile SDKs: iOS and Android workflow execution

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

Built with โค๏ธ by the Integrum team for the Kailash ecosystem.

Special recognition for the 11x performance breakthrough and 100% test pass rate achieved through innovative engineering and comprehensive testing strategies.


Ready to build enterprise-grade applications?
Install from PyPI โ€ข Documentation โ€ข Examples โ€ข GitHub

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kailash-0.8.4.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kailash-0.8.4-py3-none-any.whl (1.7 MB view details)

Uploaded Python 3

File details

Details for the file kailash-0.8.4.tar.gz.

File metadata

  • Download URL: kailash-0.8.4.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for kailash-0.8.4.tar.gz
Algorithm Hash digest
SHA256 3ea16251b8dd35a2386440735b778fcc41350b99b6aa2628adac3352b728d1db
MD5 f28c43f1527e0a10c11f985b28a45502
BLAKE2b-256 42e1a6df504c262766e13157ee57af1fc6fa7801fdd9f60f2234dff3eddfa8e8

See more details on using hashes here.

File details

Details for the file kailash-0.8.4-py3-none-any.whl.

File metadata

  • Download URL: kailash-0.8.4-py3-none-any.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for kailash-0.8.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9cbef4c1a2ffbaff3e375ed5ae5e129dd5d6b1664f250affd3fb1d79874215b9
MD5 1f7051c85abe33770092b82c428af632
BLAKE2b-256 f28bd01f5f88c5bcda67f2cb7400afe9bb304f11a04b007a7bd8f95c2b672440

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page