The site will be under maintenance on October 18, 2026.
For Python fans, the documentation is here: https://asok-framework.github.io/asok-docs
Asok Logo Asok
esc

Type to search across all documentation

Asok v0.8.0 is live — Distributed WebSockets, Multi-Tenancy & DLQ

The Elegance of
Minimalism.

The batteries-included Python web framework for building production-ready, reactive apps — with zero dependencies and zero custom JavaScript.

Asok Playground
Examples
1from asok import Request
2
3def render(request: Request):
4    return "<h1>Hello, World!</h1>"
5
6# That's it. No routing config.
7# File path = URL.
8# Just run: asok dev
1<!-- Native client-side SPA routing (Zero React/Vue) -->
2<nav>
3  <a href="/" asok-link asok-active-class="font-bold underline">Home</a>
4  <a href="/contact" asok-link asok-active-class="font-bold underline">Contact</a>
5</nav>
6
7<main asok-router asok-transition="slide-left 200">
8  <template asok-route="/" asok-meta:title="Home">...</template>
9  <template asok-route="/contact" asok-meta:title="Contact">...</template>
10</main>
11
12# Instant navigation & history state. Zero React/Vue.
1from asok import Component
2from asok.component import exposed
3
4class Counter(Component):
5    counter = 0
6
7    @exposed
8    def increment(self):
9        self.counter += 1
10
11    def render(self):
12        return self.html("counter.html")
1<!-- Lightweight client-side reactivity -->
2<div asok-state="{ count: 0 }">
3  <p asok-text="'Count: ' + count"></p>
4  <button asok-on:click="count++">
5    Increment
6  </button>
7</div>
8
9# Zero JS required. Built-in runtime handles state.
1<!-- POST JSON to Python — no fetch(), no JSON.parse() -->
2<div asok-state="{ response: null }">
3  <form asok-fetch-post="/api/contact" asok-reset>
4    <input type="email" name="email" required>
5    <textarea name="message" required></textarea>
6    <button asok-bind:disabled="loading">
7      <span asok-show="!loading">Send</span>
8      <span asok-show="loading">Sending...</span>
9    </button>
10    <p asok-show="response" asok-text="response?.message"></p>
11  </form>
12</div>
1from asok import api, RateLimit
2
3@api(summary="Create Task", input=TaskSchema)
4@RateLimit(limit=10)
5def post(request):
6    data = request.json_body
7    task = Task.create(**data)
8    return request.api(task, status=201)
9
10# Auto-generated OpenAPI 3.0 docs at /docs
0
Dependencies
50+
Features Built-in
< 50ms
Startup Time
Why Asok

Less to learn. More to ship.

One dependency-free package gives you the full stack — so you write product code, not glue code.

Zero Dependencies

Built entirely on Python's standard library. No npm, no dependency hell, fewer CVEs — just pip install asok.

Zero-JS Reactivity

Reactive directives and real-time Live Components over native WebSockets — without writing a line of JavaScript.

Batteries Included

ORM, auth, admin, forms, background jobs and auto-documented APIs — all in the box. Focus on your product, not integration.

Secure by Default

CSRF protection, template sandboxing, auto-sanitization and security headers — configured out of the box, on day one.

Included Modules

Built-in Superpowers

Everything you need to build professional applications, included in the standard library.

v0.7.0

Native SPA Router

True Single-Page Application navigation with zero frontend bundlers. Use asok-router, asok-link, and route hooks.

Multi-Engine ORM

Supports SQLite, PostgreSQL, and MySQL. High-performance querying with auto-migrations, eager loading, and soft deletes.

Enterprise API

Build industrial-grade JSON APIs with Rate Limiting, CORS, and auto-generated OpenAPI 3.0 documentation at /docs.

Secure Auth

Native sessions, PBKDF2 hashing, and granular RBAC with request.user.can().

Optional Admin

Django-style admin interface—auto-generated from models. Add with --admin flag. Roles, Inlines, CSV Export.

Vector Search

Build AI apps with native semantic search. Store embeddings and query with .nearest() without any AI database.

HTML Streaming

Lightning-fast FCP with chunked delivery. Browser starts rendering your page while the server is still generating content.

Background Workers

Built-in worker and scheduler. Run tasks asynchronously in a local thread pool, or scale with a Redis task queue.

Auto-Prefetch

Instant page transitions. Asok intelligently prefetches links on hover, making your site feel like a local application.

Email / SMTP

Send emails with built-in SMTP support. HTML templates, attachments, and async delivery without external services.

Distributed Caching

Memory, file, or Redis-based caching. Speed up operations with automatic TTL, cache keys, and template fragment caching.

i18n / Locales

Multi-language support with JSON locale files. Auto-detect user language and switch seamlessly between translations.

Asok Directives

Build interactive UIs with zero custom JS. Use asok-state and asok-on for instant reactivity.

Powerful CLI

Generators, migrations, seeders, and dev server. Scaffold routes, models, and components with a single command.

Tailwind v4

Native Tailwind CSS integration with zero npm setup. Watch mode and production minification built-in.

Animations

Svelte-style page transitions and component animations. Add asok-transition attribute for instant polish.

Dual-Core Async

Run under ASGI (Uvicorn) or WSGI (Gunicorn). Supports async page controllers, async middleware, and non-blocking ORM queries.

Cloud Storage

Seamless upload handling. Store uploaded files locally or stream directly to Amazon S3 (or any S3-compatible cloud storage).

Use Cases

Built For Everyone

From rapid prototypes to production apps, Asok adapts to your needs.

Startups & MVPs

Ship your idea in hours, not weeks. Scaffold, build and deploy from a single CLI — perfect for rapid prototyping and getting to market fast.

AI & ML Projects

Built-in vector search, HTML streaming for real-time output, and WebSocket components for interactive AI experiences. No external AI database needed.

Internal Tools

Admin interface, forms, authentication, and RBAC out of the box. Build dashboards, CRMs, and backoffice tools without reinventing the wheel.

Learning & Teaching

Clean codebase, zero dependencies, and simple architecture. Perfect for understanding web framework internals or teaching Python web development.

API Backends

Auto-generated OpenAPI docs, built-in rate limiting, and CORS support. Create REST APIs with automatic validation and documentation.

Real-time Apps

Native WebSockets, reactive components, and HTML streaming. Build dashboards, chat apps, and collaborative tools without complex JavaScript frameworks.

Side by Side

Compare. Conquer.

See how Asok eliminates boilerplate and lets you focus on what matters.

01. Routing Paradigm

Traditional (Flask/Django) Declarative
@app.route('/blog/<slug>')
def post(slug):
    return render_template('post.html')
Requires centralized URL config or manual decorators for every route.
Asok Framework File-Based
src/pages/blog/[slug]/page.py
def render(request):
    slug = request.params['slug']
    return request.html('page.html')
File-based routing. The folder structure defines the URL automatically.

02. Zero-Config ORM

Flask + SQLAlchemy Config Hell
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy(app)
class Post(db.Model):
  id = db.Column(db.Integer, ...)
  title = db.Column(db.String(100))
db.create_all() # Manual migrations
Requires SQLAlchemy, migration tools, and extensive boilerplate.
Asok Built-in ORM Auto-Migration
from asok import Model, Field
class Post(Model):
  title = Field.String()
  content = Field.Text()
  image = Field.File()
  created_at = Field.CreatedAt()
→ Auto-migrates on first run. No makemigrations needed.

03. Auto-Documented APIs

Flask REST Setup Manual Docs
from flask_restx import Api, Resource
api = Api(app, doc='/docs')
@api.route('/users')
class UserAPI(Resource):
  def get(self): ...
Requires Flask-RESTX, manual schema definitions, and boilerplate.
Asok Auto-API OpenAPI 3.0
@api(
  summary="List tasks",
  input=TaskSchema,
  output=TaskSchema
)
def render(request):
  tasks = Task.all()
  data = TaskSchema(many=True)
  return request.api(data.dump(tasks))
→ Auto-generates OpenAPI 3.0 docs at /docs
Live Demo

Reactive by Nature.

Two approaches to reactivity, both without writing JavaScript.

Asok Directives

Client-side Reactivity

No WebSocket • Pure HTML

0
Live Component

WebSocket Sync

Real-time • Multi-user

0

Same result, different approach. Both require zero JavaScript from you.

Ready to build the
impossible?

Join developers worldwide building fast, secure, and reactive apps with Asok.