Async static HTTP development server with state-preserving live reloads
Project description
⚡ alive
A lightweight, asynchronous static HTTP server for development featuring smart live-reloading without full page refreshes.
Powered by Python asyncio and watchfiles, it utilizes SSE (Server-Sent Events) and Idiomorph to morph the DOM tree instantly when files change
🔥 Features
- ⚡ Flicker-Free Reloads: Updates code instantly without annoying screen flashes.
- 💾 State Preservation: Maintains inputs, scroll positions, and form data across updates.
- 🎨 Smooth Assets Morphing: Hot-swaps HTML, CSS, and all popular image formats seamlessly.
- 🌐 Fully Asynchronous: Engineered entirely on asyncio for maximum concurrent performance.
🛠️ Tech Stack
- Python 3.10+ (asyncio ecosystem)
- watchfiles — Fast, Rust-backed cross-platform file watching
- SSE (Server-Sent Events) — Native unidirectional browser streaming
- Idiomorph — Advanced Javascript library for morphing elements
💡 Use Cases
alive was developed for Documentation Dev Mode (Sphinx, MkDocs), but you can use it for any python tooling that needs to display changing html documents.
[!warning] alive is not suitable if if you need to serve something more than static websites, such as complex javascript scripts or Single Page Applications
🚀 Quick Start
Installation
pip install alive
Command Line Interface
Run the server inside your project directory:
alive public/ --port 8080
Programmatic Usage
Embed the server directly into your Python scripts:
from alive import LiveServer
server = AliveServer("public/", port=8080)
server.run()
[!tip] Async Context Support
If you are already inside an existing event loop, use
await server.serve()instead ofserver.run()to avoid blocking your application.
📝 License
MIT
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 alive_server-0.1.1.tar.gz.
File metadata
- Download URL: alive_server-0.1.1.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
860f860d6ae3f8563039e11e2ee082e021efa7ecb53adac870186ecc128d30f4
|
|
| MD5 |
5b60436c204a9d1cb9234cb3fd3fde97
|
|
| BLAKE2b-256 |
4c23d489a15c64b7d0755f429c037c40aa5cc42f526d32aaba7333a0568d1557
|
Provenance
The following attestation bundles were made for alive_server-0.1.1.tar.gz:
Publisher:
cd.yml on saladware/alive
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
alive_server-0.1.1.tar.gz -
Subject digest:
860f860d6ae3f8563039e11e2ee082e021efa7ecb53adac870186ecc128d30f4 - Sigstore transparency entry: 2163384056
- Sigstore integration time:
-
Permalink:
saladware/alive@529213622a17f645875bd9f6e6c591d18cdd3a9e -
Branch / Tag:
refs/heads/master - Owner: https://github.com/saladware
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@529213622a17f645875bd9f6e6c591d18cdd3a9e -
Trigger Event:
push
-
Statement type:
File details
Details for the file alive_server-0.1.1-py3-none-any.whl.
File metadata
- Download URL: alive_server-0.1.1-py3-none-any.whl
- Upload date:
- Size: 21.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9677ebf108998b3d9da0d31941e8aa59cfe42c32939b2336012eb4fdd02b86a8
|
|
| MD5 |
dcc6aaa52177aa1ca9899891aa9d2149
|
|
| BLAKE2b-256 |
bfb2d366d6c871ee0000ecb339fa292ed5430a8669d351bf39e4ed02ba23095a
|
Provenance
The following attestation bundles were made for alive_server-0.1.1-py3-none-any.whl:
Publisher:
cd.yml on saladware/alive
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
alive_server-0.1.1-py3-none-any.whl -
Subject digest:
9677ebf108998b3d9da0d31941e8aa59cfe42c32939b2336012eb4fdd02b86a8 - Sigstore transparency entry: 2163384078
- Sigstore integration time:
-
Permalink:
saladware/alive@529213622a17f645875bd9f6e6c591d18cdd3a9e -
Branch / Tag:
refs/heads/master - Owner: https://github.com/saladware
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@529213622a17f645875bd9f6e6c591d18cdd3a9e -
Trigger Event:
push
-
Statement type: