← back to Rentv Sheet Enrich
__pycache__/live_server.cpython-314.pyc
132 lines
+
�~j�5 � �� � R t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI H
t
Ht ]P P ^ ]P P ]P P ]4 4 4 ^ RIt^ RIt]P P ]P P ]4 4 tRRutt]P, P/ RR4 t]P, P/ RR4 t]P4 ! 4 tR t ! R
R]4 tR^/R
lt^ RI t!Rs"]P4 ! 4 t#R t$R t%R t&R t'R t(R t)R t*RR lt+R t, ! R R]
4 t-^ RI.tR t/]0R8X d
]/! 4 R# R# )u=
live_server.py — LIVE two-way web console over the RENTV CRE contacts Google Sheet.
Reuses lib.py (OAuth token + read_tab + green-stamping batch_fill), so no new auth.
GET / -> the console UI (public_live/index.html)
GET /api/meta -> [{gid,title}] (all tabs)
GET /api/tab?gid=N -> {gid,title,headers,rows} (pull latest — Sheet->UI)
POST /api/write -> {gid,row0,col0,value} write one cell green (UI->Sheet)
POST /api/enhance -> {prompt} optional local-Ollama draft polish ($0, if up)
Two independent sync directions: writes are event-driven (on cell edit); the UI polls
/api/tab to pull external Sheet edits. Basic-auth admin/DW2024! per the viewer convention.
All contacts are Steve Bloom's (RENTV) — ADD only, never bulk-overwrite. $0 (local).
N)�BaseHTTPRequestHandler�ThreadingHTTPServer�adminzDW2024!�
OLLAMA_URLz#http://localhost:11434/api/generate�DRAFT_MODELz qwen3:14bc � � \ ;_uu_ 4 \ P ! 4 uuR R R 4 # + '