Duck is a powerful, open-source, full-fledged Python-based web server, framework, and reverse proxy designed for building modern, customizable web applications — from small sites to large-scale platforms.
Project description
Duck Framework
Duck is an open-source Python web framework and web server with built-in reactive UI and real-time WebSocket support. Build high-performance, scalable, server-side reactive web applications — without separate frontend frameworks or complex JavaScript stacks.
It simplifies web development with:
- Built-in HTTPS support for secure connections
- Native HTTP/2 support with HTTP/1 backward compatibility link
- Hassle-free free SSL certificate generation with automatic renewal link
- Lively Component System — with
VDom Diffing(support for fast UI's) - WebSocket support — modern websocket implementation with
per-message compression. - Built-in task automation — no need for cron jobs
- Automatic content compression using
gzip,deflateorbrotli - Support for chunked transfer encoding
- Easy integration with existing Django projects using
django-addcommand. - Organized routing with Duck
Blueprints - Full support for async views or asynchronous code even in
WSGIenvironment - Dynamic project generation with
makeproject(mini,normal, orfull) - Runs on both
WSGIandASGIenvironments, can even runasyncprotocols likeHTTP/2orWebSocketsonWSGI. - High-performance with low-latency response times
- Resumable downloads for large files
- Protection against DoS, SQL Injection, Command Injection, and other threats
- Auto-reload in debug mode for rapid development
- Free production SSL — no certificate costs
- Automatic SSL renewal using
certbotplus Duck automation system - Comes with built-in web development tools and helpers
- Log management with
duck logsand file-based logging by default - Real-time system monitoring for CPU, RAM, Disk usage, and I/O activity with
duck monitor - Easily generate app sitemap using command
duck sitemapor just use the builtin blueprintduck.etc.apps.essentials.blueprint.Sitemapfor dynamic cached sitemap serving. - Comes with independant micro applications which runs on their own servers for micro services support.
- Highly customizable to fit any use case
And more — see feature list
Upcoming Features
- HTTP/3 with QUIC – Faster, modern transport for improved performance.
- QUIC WebTransport – A next-gen alternative to WebSockets for real-time communication.
- Component Pre-rendering System – A system to preload components in the background thread to reduce initial load times of component trees.
- Customizable Dashboards – Tailor interfaces to your workflow and preferences.
- MQTT (Message Queuing Telementry Transport) Integration – Run your own broker and manage IoT devices with ease.
- Duck WebApp to APK – Easily convert a Duck web application to APK.
- DuckSight Hot Reload – Instead of full reload on file changes, implement hot reload for the DuckSight Reloader. This is faster and efficient than full reload.
- Internal Updates – Implement logic for listing and securely applying updates when available, utilizing cryptographic code signing (using standards like TUF) to verify GitHub-sourced updates, protecting against rollbacks, and man-in-the-middle exploits.
Worker Processes – Use of worker processes to utilize all available CPU cores for improved request handling.- Complete Reverse Proxy Server – Duck only acts as reverse proxy for Django only. Need to make Duck a full-fledged reverse proxy server with optional sticky sessions.
Component Mutation Observer – Need to build an optional component mutation observer for keeping track of child changes for fastest re-render (approx. 75x fast on unchanged children).- MCP (Model Context Protocol) Server – Need to make it easy for creating MCP servers for easy AI communication.
- ...and more – Request a feature
🦆 Fun Facts
- The Duck official website is powered by the Duck framework itself—showcasing a true "dogfooding" approach!
- Duck's Lively components bring you a Lively UI that's exceptionally fast and responsive, eliminating slow page re-rendering for a seamless user experience.
Getting Started
Install latest version from Github using:
pip install git+https://github.com/duckframework/duck.git
Or install from PyPi using:
pip install duckframework
Project Creation
duck makeproject myproject
This creates a normal project named myproject. You can also create other project types using:
--fullfor a full-featured project--minifor a simplified starter project
Full Project
The full version includes everything Duck offers. Recommended for experienced developers.
duck makeproject myproject --full
Mini Project
Beginner-friendly. Lightweight version with essential functionality.
duck makeproject myproject --mini
Simple Startup
duck makeproject myproject
cd myproject
duck runserver # or: python3 web/main.py
This starts the server at http://localhost:8000
Duck serves a basic site by default — explore more at Documentation
Django Integration
If you have an existing Django project and want production features like HTTPS, HTTP/2, and resumable downloads, Duck makes it easy.
Unlike nginx setups, Duck simplifies this with a few commands.
Benefits
- Native HTTP/2 & HTTPS implementation.
- Extra built-in security middleware (DoS, SQLi, etc.)
- Duck and Django run in the same Python environment (faster communication)
- Auto-compressed responses
- Resumable large downloads
- Fast and Reactive Lively components - for beautiful & responsive UI.
- Free SSL with renewal
- and more
Usage
duck makeproject myproject
cd myproject
duck django-add "path/to/your/django_project"
duck runserver -dj
Notes:
- Follow instructions provided by
django-addcommand carefully - Make sure your Django project defines at least one
urlpattern - Once setup, you’re good to go!
Useful Links
🚀 Premium Duck Components Coming Soon!
All our UI components are currently free and open source. Stay tuned for upcoming Pro Packs featuring advanced dashboards, e-commerce, and integrations!
⭐ Star this repo to get notified on release!
Contributing & Issues
Duck is open to all forms of contribution — financial or technical.
Sponsorship/Donations:
Support development at Open Collective
Report issues:
Use the GitHub Issues page
Duck is updated regularly — check the repo for improvements and bug fixes.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file duckframework-1.0.2.tar.gz.
File metadata
- Download URL: duckframework-1.0.2.tar.gz
- Upload date:
- Size: 2.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14bf6ff0eaa6ca0c713ffae2ee6ffebd6f74c7796f01d47081916f799cd4480a
|
|
| MD5 |
cbd29c08e867efa7e1d9ad6a2946cc4d
|
|
| BLAKE2b-256 |
a09cef666a94b3a2e202cefa48725919a8d60695c4d86291384328ed225b19ba
|
Provenance
The following attestation bundles were made for duckframework-1.0.2.tar.gz:
Publisher:
pypi-publish.yml on duckframework/duck
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
duckframework-1.0.2.tar.gz -
Subject digest:
14bf6ff0eaa6ca0c713ffae2ee6ffebd6f74c7796f01d47081916f799cd4480a - Sigstore transparency entry: 1045509577
- Sigstore integration time:
-
Permalink:
duckframework/duck@e9a618416377d4448ebe48be08e8b06b4653d01c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/duckframework
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@e9a618416377d4448ebe48be08e8b06b4653d01c -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file duckframework-1.0.2-py3-none-any.whl.
File metadata
- Download URL: duckframework-1.0.2-py3-none-any.whl
- Upload date:
- Size: 2.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c49c241998e230242254515f30f275d46694ba2470497cb0c92d221adb1844a
|
|
| MD5 |
43047fa6120b4fee3c71d659b2fc5288
|
|
| BLAKE2b-256 |
ae8cec02d2a892a0bb6263b291d7f77cf4c8b5fc94f4bfd158ecbb684e69f9c1
|
Provenance
The following attestation bundles were made for duckframework-1.0.2-py3-none-any.whl:
Publisher:
pypi-publish.yml on duckframework/duck
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
duckframework-1.0.2-py3-none-any.whl -
Subject digest:
7c49c241998e230242254515f30f275d46694ba2470497cb0c92d221adb1844a - Sigstore transparency entry: 1045509586
- Sigstore integration time:
-
Permalink:
duckframework/duck@e9a618416377d4448ebe48be08e8b06b4653d01c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/duckframework
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@e9a618416377d4448ebe48be08e8b06b4653d01c -
Trigger Event:
workflow_run
-
Statement type: