Skip to main content

meadows-web

MEADOWS web host: a dumb HTTP host that serves index.html and static assets. No Socket.IO, no auth, no domain logic. The browser is the client; the Socket.IO connection runs browser→meadows-server, NOT via this Python webserver. See MEADOWS-migration-intent.md section 2 line 40 and section 4 line 115.

Architecture

graph LR
    B[Browser<br>JS] -->|Socket.IO| S[meadows-server<br>:8080]
    B -->|HTTP| W[meadows-web<br>:8081]
    W -.->|static files only| B

The browser connects directly to meadows-server via Socket.IO. This Python server is just a file host.

What this package contains

  • app.py — the Starlette ASGI app. Serves / → dist/index.html and /static/* → assets. Nothing else.
  • build.py — template injection: reads templates/index.html, injects protocol constants + env config, writes dist/index.html.
  • templates/index.html — minimal webchat page (Socket.IO client in the browser).
  • __main__.py — python -m meadows.web entrypoint (uvicorn).

Install

uv pip install -e ".[dev]"

This pulls in meadows-protocol (editable, via the sibling path) — the only MEADOWS dependency. The web host touches meadows.protocol solely to inject EventName constants into the template. It does not import Message, JWTClaims, or any domain model.

Build the template

uv run python -m meadows.web.build

Run

uv run python -m meadows.web
# or
uv run uvicorn meadows.web.app:app --host 0.0.0.0 --port 8081

Test

uv run pytest -q

Architecture invariants

  1. Dumb host. No Socket.IO, no auth, no JWT, no message parsing. It serves files. Period.
  2. TLS is not a concern. Traefik terminates TLS (section 4 line 115). No cert logic here.
  3. Protocol constants only. The only import from meadows.protocol is EventName (for template injection).
  4. PEP 420 namespace. src/meadows/web/__init__.py exists; there is NO src/meadows/__init__.py.

Configuration (env vars, managed via check_env in tasks.py:setup)

variable default purpose
MEADOWS_WEB_HOST 0.0.0.0 bind address for uvicorn
MEADOWS_WEB_PORT 8081 bind port for uvicorn
MEADOWS_SERVER_URL http://localhost:8080 server URL injected into the page (browser Socket.IO target)
MEADOWS_SYSTEM_NAME MEADOWS Chat display name injected into the page
PROJECT meadows Traefik router prefix
HOSTINGDOMAIN localhost Traefik host domain

Metadata

Release files for meadows-web 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for meadows-web 0.1.0
File Size Uploaded
meadows_web-0.1.0.tar.gz 114.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for meadows-web 0.1.0
File Interpreter ABI Platform
meadows_web-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 183.3 kB

Release files / meadows_web-0.1.0.tar.gz

Download URL meadows_web-0.1.0.tar.gz
Size 114.1 kB
Tags Source
SHA-256 checksum
How to use checksums
78facca673686e6f83321a512a093e7d452d06906e280b0bfb7feb7a582f489b
BLAKE2b-256 checksum
How to use checksums
135e18927610d2f6798b1c2b3f4f1c2e37da5fa90dd0cd6149b350e62cf6f192
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"22.3","id":"zena","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / meadows_web-0.1.0-py3-none-any.whl

Download URL meadows_web-0.1.0-py3-none-any.whl
Size 69.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
960a6a9dca53457af7a3f4ea6a1bdbfa631958ebbe938dbd38d30fe04a9421cb
BLAKE2b-256 checksum
How to use checksums
99d9f2250d0eff423d6a8bf11893e004aecb9bf212af6ed9fcec6301a55acd1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"22.3","id":"zena","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page