Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

ludic

Latest version: v1.1.2

Overview

Last scanned
25 Nov 2026
Published
25 Nov 2026
PyPI package Publisher: paveldedik
7 Versions
1.5K Downloads

Scan summary

ludic was last scanned on 25 Nov 2026 at version 1.1.2. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 7 versions; the latest 5 were published within 2 days (24 and 25 Nov 2026).
  • Findings: No rules fired in version 1.1.2.
  • Downloads: 1,457 downloads.

Versions

7 versions published
Versions and the rules that fired in each
VersionPublishedStatus
1.1.2 LATEST 25 Nov 2026 No rules fired
1.1.1 25 Nov 2026 No rules fired
1.1.0 24 Nov 2026 No rules fired
1.0.5 24 Nov 2026 Not shown
0.5.21 24 Nov 2026 Not shown

No rules fired in 1.1.2

Findings

Findings for v1.1.2. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 1.1.2; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

test Python 3.14+ Discord Server

Documentation: https://getludic.dev/docs/


Ludic lets you write HTML as typed Python components. Your type checker validates the markup, so wrong nesting, unknown attributes and missing arguments are caught before a page ever renders. At its core Ludic only renders HTML, so it fits into the web framework you already use, and it pairs naturally with htmx.

from typing import override

from ludic import Attrs, Component
from ludic.html import a, b, p


class LinkAttrs(Attrs):
    to: str


class Link(Component[str, LinkAttrs]):
    @override
    def render(self) -> a:
        return a(*self.children, href=self.attrs["to"])


p(t"Hello {b('Stranger')}! Click {Link('here', to='/home')}.").to_html()
# <p>Hello <b>Stranger</b>! Click <a href="/home">here</a>.</p>

Invalid markup is a type error. This is what mypy reports:

br("Hello, World!")
# error: Argument 1 to "br" has incompatible type "str"; expected "Never"

html(body())
# error: Argument 1 to "html" has incompatible type "body"; expected "head"

div("Test", href="test")
# error: Unexpected keyword argument "href" for "div"

Link("here", too="/home")
# error: Unexpected keyword argument "too" for "Link"; did you mean "to"?

Link(div("here"), to="/home")
# error: Argument 1 to "Link" has incompatible type "div"; expected "str"

Link("here")
# error: Missing named argument "to" for "Link"

"I've just composed my first PageLayout component and I have no words!"

– Igor Davydenko


Features

  • Type-guided HTML: every element knows which children and attributes it allows
  • Components in pure Python, composed like in React
  • Mix markup and text with Python 3.14 t-strings (template strings)
  • Text is escaped by default, trusted markup is marked explicitly with Safe
  • Typed \</> htmx attributes, so dynamic pages need almost no JavaScript
  • Works with Starlette, FastAPI and Django, or with no framework at all
  • Typed CSS for your components with Themes
  • Simple, responsive layouts adopted from the Every Layout Book

Installation

Ludic 1.x requires Python 3.14+ for t-string support. If you are on Python 3.12 or 3.13, use Ludic 0.5.x, which uses f-strings instead.

The core package renders HTML and has a single dependency:

pip install ludic

To also get the Starlette based web framework, form parsing and code highlighting:

pip install "ludic[full]"

You can also use a basic cookiecutter template to get started quickly. With UV, you need to run only one command:

uvx cookiecutter gh:getludic/template
Type Checking

Elements from ludic.html are checked by plain type hints, so mypy and pyright (and Pylance in VS Code) report the errors above, except those about component attributes. To also check the attributes of your own components, enable the mypy plugin in pyproject.toml:

[tool.mypy]
plugins = ["ludic.mypy_plugin"]

Use It With Your Framework

Ludic does not enforce any frontend or backend framework. Pick the integration that matches your stack:

Starlette – LudicApp is a thin wrapper around Starlette, handlers return elements directly:

from ludic.html import b, p
from ludic.web import LudicApp

app = LudicApp()


@app.get("/")
async def homepage() -> p:
    return p(t"Hello {b('Stranger')}!")

FastAPI – set the route class and return elements from your endpoints:

from fastapi import FastAPI

from ludic.contrib.fastapi import LudicRoute
from ludic.html import p

app = FastAPI()
app.router.route_class = LudicRoute


@app.get("/")
async def homepage() -> p:
    return p("Hello, World!")

Django – wrap the element in a response:

from django.http import HttpRequest

from ludic.contrib.django import LudicResponse
from ludic.html import p


def index(request: HttpRequest) -> LudicResponse:
    return LudicResponse(p("Hello, World!"))

Anything else – element.to_html() returns a string, which every framework can send as a response.

htmx

htmx attributes are typed like any other attribute:

button("Load more", hx_get="/items?page=2", hx_target="#items", hx_swap="beforeend")
# <button hx-get="/items?page=2" hx-target="#items" hx-swap="beforeend">Load more</button>

The examples reimplement the patterns from htmx.org, such as click to edit, infinite scroll, active search and bulk update.

Composable Components

Instead of using only basic HTML elements, you can build modular components with the support of Python's type system. The catalog ships ready-made ones:

Table(
    TableHead("Id", "Name"),
    TableRow("1", "John"),
    TableRow("2", "Jane"),
    TableRow("3", "Bob"),
)

This structure is type-checked: a Table expects one TableHead followed by any number of TableRow components.

Styles and Themes

Components can declare their CSS classes and styles, and read colors, fonts and sizes from the active theme:

class Link(Component[str, LinkAttrs]):
    classes = ["link"]

    @override
    def render(self) -> a:
        return a(
            *self.children,
            href=self.attrs["to"],
            style={"color": self.theme.colors.primary},
        )

CSS properties are typed as well, so your editor completes them:

Comparison

Here is how Ludic compares to other ways of producing HTML in Python:

Ludic htpy FastHTML tdom Jinja2
How you write HTML Python calls and t-strings Python calls, children in [] Python calls HTML inside t-strings Template files
Children and attributes type-checked per element Yes No No No No
Web framework Optional: Starlette, FastAPI, Django or none Any Its own, built on Starlette Any Any
Python 3.14+ (3.12+ with 0.5.x) 3.10+ 3.10+ 3.14+ 3.7+

The others are a better fit in some cases:

  • htpy supports older Python versions and needs no type checker plugin.
  • FastHTML is a complete web framework rather than a library you add to one.
  • tdom lets you write real HTML syntax instead of Python calls.
  • Jinja2 keeps templates in files that people who do not write Python can edit.

Migration from v0.5 to v1.0

Ludic 1.0 requires Python 3.14+ and introduces a major change: t-strings (template strings) replace the previous f-string approach with FormatContext. This provides better performance, simpler code, and enhanced security.

Key Changes

Replace f" with t" when mixing HTML elements with text:

# v0.5 (f-strings)
div(f"Hello {b('World')}")

# v1.0 (t-strings)
div(t"Hello {b('World')}")
Version Compatibility
  • Ludic 0.5.x: Python 3.12, 3.13 (uses f-strings)
  • Ludic 1.0.x: Python 3.14+ (uses t-strings)

More Examples

For more complex usage incorporating all capabilities of the framework:

Agent Skills

Ludic ships two agent skills, installable via the skills CLI (works with any supported coding agent):

  • ludic-components — building components: t-string templating, Component / ComponentStrict typing, the catalog widgets, htmx attributes, the trusted-vs-untrusted (Safe) content boundary.
  • ludic-web — building web apps: LudicApp, typed Endpoint classes, FastAPI / Django integrations, parsers and responses, htmx response patterns, and safe URL generation (host header poisoning mitigations).

Install one:

npx skills add https://github.com/getludic/ludic --skill ludic-components
npx skills add https://github.com/getludic/ludic --skill ludic-web

Install both at once:

npx skills add https://github.com/getludic/ludic --skill ludic-components --skill ludic-web
# or, equivalently:
npx skills add https://github.com/getludic/ludic --skill '*'

In Claude Code, you can install both skills as a plugin instead:

/plugin marketplace add getludic/ludic
/plugin install ludic@ludic

Once installed, the agent will pick the relevant skill up automatically whenever you ask it to write or modify Ludic code.

Agents that look up documentation with Context7 get the Ludic docs and a short list of rules for writing Ludic code from there.

Contributing

Any contributions to the framework are warmly welcome! Your help will make it a better resource for the community. If you're ready to contribute, read the contribution guide.

  • GitHub Issues - If you encounter a bug, please report it here.
  • GitHub Discussions - To request a new feature, this is the best place to initiate the discussion.
  • Discord - Join our Discord server for support, sharing ideas, and receiving assistance.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases ludic

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

Frame 2085668439 (1)
Group 1261154229