Skip to content
Logo LogoDuck Framework — Python Web Framework | Build Web Apps Without JavaScript
Go Home
⌘ K
Logo LogoDuck Framework — Python Web Framework | Build Web Apps Without JavaScript
Go Home

Table of Contents:

  • 🚀 Getting Started — Duck Python Web Framework (No JavaScript Required)
  • 🌟 Running the Server
  • 🌀 Project structure
  • 🗃 Cached Views – High-Performance Python Web Apps
  • 🛠 Settings Configuration
  • 🖥️ Lively Component System — Reactive Python UI Without JavaScript
  • 📟 Simple Counter App in Python
  • 🌀 Component Caching Utilities
  • 📑 Templates - Python-Based HTML Rendering | Duck
  • 🏷️ Template Tags & Filters
  • 📘 Blueprints
  • ⛴️ Micro Applications
  • ⏳ Task Automation – Duck Python Framework
  • 🚧 HTTP/2 and HTTPS
  • 🖥️ Web Server Gateway (WSGI)
  • ⚡ Asynchronous Server Gateway (ASGI)
  • 🌐 WebSockets in Python – Real-Time Apps with Duck
  • 🔋Background Thread & Asyncio Loop Managers
  • 🔀 Request & Response
  • 🔐 Sessions in Duck
  • 🛡️ Duck Middlewares
  • 📝 Duck Logging System
  • 🗄️️ Database
  • 🐤 Django Integration with Duck
  • 📄 Sitemap
  • 🚀 Deployment Guide
  • 📊 Duck System Monitor
  • 🌐 Duck Service Management
  • 🔐 Free SSL Certificate
  • 🔌 Socket I/O (xsocket)
  • 💡Duck Shortcuts
  • ⌛ Duck Utilities

API Documentation:

  • API Reference
    • duck
Duck Framework — Python Web Framework | Build Web Apps Without JavaScript
/
API Reference
/
duck
/
duck.html
/
duck.html.components
/
duck.html.components.link

duck.html.components.link¶

Link component module.

Module Contents¶

Classes¶

Link

Link component.

API¶

class duck.html.components.link.Link(url: str = None, text: str = None, *args, **kwargs)[source]¶

Bases: duck.html.components.InnerComponent

Link component.

Parameters:
  • url – The link’s URL.

  • text – Text for the link.

Initialization

Initialize an HTML component.

Parameters:
  • element – The HTML element tag name (e.g., textarea, input, button). Can be None, but make sure element is returned by get_element method.

  • accept_inner_html – Whether the HTML component accepts an inner body (e.g., inner-body-here).

  • inner_html – Inner html to add to the HTML component. Defaults to None.

  • properties – Dictionary for properties to initialize the component with.

  • props – Just same as properties argument (added for simplicity).

  • style – Dictionary for style to initialize the component with.

  • **kwargs – Extra keyword arguments

Raises:

HtmlComponentError – If ‘element’ is not a string or ‘inner_html’ is set but ‘accept_inner_html’ is False.

get_element()[source]¶
on_create()[source]¶
duck.html.components.label
duck.html.components.lively

On this page

  • Module Contents
    • Classes
    • API
      • Link
        • Link.get_element()
        • Link.on_create()

© 2026, Duck Framework Built with Sphinx 8.2.3