meadows-web
MEADOWS web host: a dumb HTTP host that serves
index.htmland 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. SeeMEADOWS-migration-intent.mdsection 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.htmland/static/*→ assets. Nothing else.build.py— template injection: readstemplates/index.html, injects protocol constants + env config, writesdist/index.html.templates/index.html— minimal webchat page (Socket.IO client in the browser).__main__.py—python -m meadows.webentrypoint (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
- Dumb host. No Socket.IO, no auth, no JWT, no message parsing. It serves files. Period.
- TLS is not a concern. Traefik terminates TLS (section 4 line 115). No cert logic here.
- Protocol constants only. The only import from
meadows.protocolisEventName(for template injection). - PEP 420 namespace.
src/meadows/web/__init__.pyexists; there is NOsrc/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 |
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 meadows_web-0.1.0.tar.gz.
File metadata
- Download URL: meadows_web-0.1.0.tar.gz
- Upload date:
- Size: 114.1 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78facca673686e6f83321a512a093e7d452d06906e280b0bfb7feb7a582f489b
|
|
| MD5 |
dd4d216438537c4b38163adc4de2fa45
|
|
| BLAKE2b-256 |
135e18927610d2f6798b1c2b3f4f1c2e37da5fa90dd0cd6149b350e62cf6f192
|
File details
Details for the file meadows_web-0.1.0-py3-none-any.whl.
File metadata
- Download URL: meadows_web-0.1.0-py3-none-any.whl
- Upload date:
- Size: 69.2 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
960a6a9dca53457af7a3f4ea6a1bdbfa631958ebbe938dbd38d30fe04a9421cb
|
|
| MD5 |
b2daa8dbf791034ae87bd16ae1e7c0f6
|
|
| BLAKE2b-256 |
99d9f2250d0eff423d6a8bf11893e004aecb9bf212af6ed9fcec6301a55acd1f
|