Skip to main content

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 of server.run() to avoid blocking your application.

📝 License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

alive_server-0.1.1.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

alive_server-0.1.1-py3-none-any.whl (21.7 kB view details)

Uploaded Python 3

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

Hashes for alive_server-0.1.1.tar.gz
Algorithm Hash digest
SHA256 860f860d6ae3f8563039e11e2ee082e021efa7ecb53adac870186ecc128d30f4
MD5 5b60436c204a9d1cb9234cb3fd3fde97
BLAKE2b-256 4c23d489a15c64b7d0755f429c037c40aa5cc42f526d32aaba7333a0568d1557

See more details on using hashes here.

Provenance

The following attestation bundles were made for alive_server-0.1.1.tar.gz:

Publisher: cd.yml on saladware/alive

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for alive_server-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9677ebf108998b3d9da0d31941e8aa59cfe42c32939b2336012eb4fdd02b86a8
MD5 dcc6aaa52177aa1ca9899891aa9d2149
BLAKE2b-256 bfb2d366d6c871ee0000ecb339fa292ed5430a8669d351bf39e4ed02ba23095a

See more details on using hashes here.

Provenance

The following attestation bundles were made for alive_server-0.1.1-py3-none-any.whl:

Publisher: cd.yml on saladware/alive

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page