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 |
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)
| File | Size | Uploaded | |
|---|---|---|---|
| meadows_web-0.1.0.tar.gz | 114.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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}
|