Skip to main content

Shakti — AI-first, async Python web framework. Born in India, built for the world.

Project description

Shakti

An AI-first, async Python web framework.

Born in India. Built for the world.

pip install "shakti[server]"

Why Shakti?

Feature Django FastAPI Shakti
Async-first
Built-in ORM
Admin panel
JWT Auth
Built-in AI
WebSockets
Background Jobs
Monitoring
Document AI

Quick Start

pip install "shakti[all]"
shakti new myapp
cd myapp
shakti run --reload

Visit http://127.0.0.1:8000 — your app is live.


60-second example

from shakti import Shakti, Depends
from shakti.config import Config
from shakti.orm import Database, Repository
from shakti.auth import Auth
from shakti.auth.models import User
from shakti.ai import AI
from shakti.admin import Admin
from shakti.monitoring import Monitor
from shakti.workflows import WorkflowEngine
from shakti.websocket import WebSocket

config = Config()
app = Shakti(title="My App", config=config)

db = Database(config.require("database.url"))
db.init_app(app)

auth = Auth(db, secret_key=config.require("auth.secret_key"))
auth.init_app(app)

ai = AI(config)
ai.init_app(app)

admin = Admin(db, auth, title="My Admin")
admin.register(User)
admin.init_app(app)

monitor = Monitor()
monitor.init_app(app)

workflows = WorkflowEngine()
workflows.init_app(app)

@app.get("/")
async def index() -> dict:
    return {"framework": "Shakti", "status": "running"}

@app.get("/me")
async def me(user: User = Depends(auth.get_current_user())) -> dict:
    return user.to_dict()

@app.websocket("/ws/chat")
async def chat(ws: WebSocket) -> None:
    await ws.accept()
    async for msg in ws.iter_json():
        reply = await ai.chat(msg["text"])
        await ws.send_json({"reply": reply})

One app. Everything included:

  • ✅ Async REST API
  • ✅ JWT authentication
  • ✅ AI chat (Claude/OpenAI)
  • ✅ WebSocket real-time
  • ✅ Admin panel at /admin/
  • ✅ Monitoring at /monitor/
  • ✅ Background jobs
  • ✅ PDF/OCR document AI

Install

pip install shakti                    # core only
pip install "shakti[server]"          # + uvicorn
pip install "shakti[orm]"             # + SQLAlchemy
pip install "shakti[auth]"            # + JWT + bcrypt
pip install "shakti[ai]"              # + Claude/OpenAI
pip install "shakti[monitoring]"      # + psutil
pip install "shakti[all]"             # everything

CLI

shakti new myapp                         # scaffold project
shakti run --reload                      # start dev server
shakti generate model Post title:str body:text   # generate model
shakti generate api Comment body:text    # model + full CRUD
shakti makemigrations "add posts"        # create migration
shakti migrate                           # apply migrations
shakti version                           # show version

Configuration

# config/settings.yaml
app:
  name: myapp
  debug: true

database:
  url: sqlite+aiosqlite:///./myapp.db

auth:
  secret_key: ${SECRET_KEY}

ai:
  provider: anthropic
  model: claude-sonnet-4-6
  api_key: ${ANTHROPIC_API_KEY}
  system_prompt: "You are a helpful assistant."

Modules

Module Import What it does
Core from shakti import Shakti Routing, middleware, DI, config
ORM from shakti.orm import Database SQLAlchemy async + migrations
Auth from shakti.auth import Auth JWT, RBAC, API keys
AI from shakti.ai import AI Claude/OpenAI, RAG, agents
Admin from shakti.admin import Admin Auto-generated admin panel
WebSocket from shakti.websocket import WebSocket Real-time connections
Document AI from shakti.docs import DocumentAI PDF, OCR, document Q&A
Workflows from shakti.workflows import WorkflowEngine Background jobs
Monitoring from shakti.monitoring import Monitor Health checks, metrics

License

MIT © Aditya Bhat — Born in India 🇮🇳

Project details


Download files

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

Source Distribution

shakti_framework-0.1.0.tar.gz (92.7 kB view details)

Uploaded Source

Built Distribution

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

shakti_framework-0.1.0-py3-none-any.whl (95.3 kB view details)

Uploaded Python 3

File details

Details for the file shakti_framework-0.1.0.tar.gz.

File metadata

  • Download URL: shakti_framework-0.1.0.tar.gz
  • Upload date:
  • Size: 92.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for shakti_framework-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ba1cbbf5227040fdf01ea5841f33e81241f934819d3fbaa124fcd300d2237f9b
MD5 ac4d6d1668fc83eb63ccce64fc648f5a
BLAKE2b-256 b075a23dd0de61f892c8b1e4e64446d036d72c8404c4af276d36b50fe597cd7a

See more details on using hashes here.

File details

Details for the file shakti_framework-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for shakti_framework-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 da8d3062d1e6c3e351da3f0eb90baae61269f4d4a5c3277d55e1f15040ce3327
MD5 73472608d612634d68033db22c0cd6c4
BLAKE2b-256 bc639a488e861535c4a1f9016a0bd4afe5bdd8f94d00d74f77df1c0ccf45b130

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