1:"$Sreact.fragment"
2:I[15579,["/_next/static/chunks/fd0661f1506dcbc6.js","/_next/static/chunks/94245cbda44972fe.js","/_next/static/chunks/af778fff4a0f4be6.js","/_next/static/chunks/b096b037d08e2f31.js"],"Navigation"]
3:I[3013,["/_next/static/chunks/fd0661f1506dcbc6.js","/_next/static/chunks/94245cbda44972fe.js","/_next/static/chunks/af778fff4a0f4be6.js","/_next/static/chunks/b096b037d08e2f31.js"],""]
82:I[41451,["/_next/static/chunks/fd0661f1506dcbc6.js","/_next/static/chunks/94245cbda44972fe.js","/_next/static/chunks/af778fff4a0f4be6.js","/_next/static/chunks/b096b037d08e2f31.js"],"Footer"]
83:I[47913,["/_next/static/chunks/316a3a63422f35de.js"],"OutletBoundary"]
84:"$Sreact.suspense"
:HL["/blog/posts/async-sqlite-fastapi/hero.jpg","image"]
:HL["/blog/posts/logo.png","image"]
0:{"buildId":"TlpKRvbES4zzM7LeczAM7","rsc":["$","$1","c",{"children":[[["$","$L2",null,{}],["$","main",null,{"className":"pt-20 md:pt-24","children":["$","article",null,{"children":[["$","header",null,{"className":"border-b border-border","children":["$","div",null,{"className":"container mx-auto px-6 py-14 md:py-20","children":[["$","$L3",null,{"href":"/blog","className":"mb-8 inline-flex items-center text-sm font-medium text-muted-foreground transition-colors hover:text-foreground","children":[["$","svg",null,{"xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-arrow-left mr-2 h-4 w-4","aria-hidden":"true","children":[["$","path","1l729n",{"d":"m12 19-7-7 7-7"}],["$","path","x3x0zl",{"d":"M19 12H5"}],"$undefined"]}],"Blog"]}],["$","div",null,{"className":"grid gap-8 md:grid-cols-[1fr_0.9fr] md:items-start","children":[["$","div",null,{"className":"max-w-3xl","children":[["$","div",null,{"className":"mb-5 flex flex-wrap items-center gap-3 text-sm text-muted-foreground","children":[["$","span",null,{"className":"rounded-md border border-primary/40 bg-primary/10 px-2.5 py-1 text-primary","children":"Concurrency"}],["$","span",null,{"children":"2026-W20"}],["$","span",null,{"aria-hidden":"true","children":"/"}],["$","span",null,{"children":"4 min read"}],[["$","span",null,{"aria-hidden":"true","children":"/"}],["$","span",null,{"children":["by ",["$","span",null,{"className":"font-medium text-foreground","children":"delve"}]]}]]]}],["$","h1",null,{"className":"text-4xl font-bold leading-tight text-balance md:text-6xl","children":"Blocking SQLite in an Async FastAPI Route"}],["$","p",null,{"className":"mt-6 text-lg leading-relaxed text-muted-foreground md:text-xl","children":"A 2ms SQLite read becomes a 200ms tail latency on every other route. The event loop is the bottleneck, not the database. Anything that touches the filesystem or a socket inside an `async def` body belongs in `run_in_executor`."}]]}],["$","div",null,{"className":"overflow-hidden rounded-lg border border-border bg-card","children":["$","div",null,{"className":"relative aspect-[16/9] overflow-hidden","children":[null,["$","img",null,{"src":"/blog/posts/async-sqlite-fastapi/hero.jpg","alt":"A single brass funnel on a worn wooden workbench with one droplet caught mid-fall above its narrow neck, sharp focus on the droplet, soft side light, no people, editorial.","className":"h-full w-full object-cover"}],["$","img",null,{"src":"/blog/posts/logo.png","alt":"","aria-hidden":"true","className":"pointer-events-none absolute right-4 top-4 h-[50px] w-[50px] mix-blend-screen"}]]}]}]]}]]}]}],["$","div",null,{"className":"container mx-auto px-6 py-12 md:py-16","children":["$","div",null,{"className":"grid gap-10 lg:grid-cols-[minmax(0,1fr)_280px] lg:items-start","children":[["$","div",null,{"className":"max-w-3xl text-muted-foreground","children":[[["$","h2","h2-0",{"className":"mt-12 text-2xl font-semibold leading-snug text-foreground first:mt-0","children":"The problem"}],"\n",["$","p","p-0",{"className":"mt-4 text-base leading-8 md:text-lg first:mt-0 first:text-xl first:leading-relaxed first:text-foreground md:first:text-2xl","children":["You wire up a new FastAPI endpoint that needs to query a SQLite file — a job queue, feature flags, a local cache. The code looks fine: you open a connection, run ",["$","code","code-0",{"className":"rounded bg-secondary px-1.5 py-0.5 text-[0.9em] text-foreground","children":"fetchone"}],", close it. Benchmarks pass. Then you put it in production and notice that under modest load every other route starts spiking in latency. The SQLite call is 2ms; the tail is 200ms. The database is not the bottleneck — the event loop is."]}],"\n",["$","p","p-1",{"className":"mt-4 text-base leading-8 md:text-lg first:mt-0 first:text-xl first:leading-relaxed first:text-foreground md:first:text-2xl","children":["FastAPI routes are ","$L4"," and run on the uvicorn event loop. The event loop is a single thread. Any synchronous I/O inside an ","$L5"," body — file reads, ","$L6",", blocking sockets — suspends the entire loop for the duration of that call. One slow SQLite read blocks every concurrent request in the process."]}],"\n","$L7","\n","$L8","\n","$L9","\n","$La","\n","$Lb","\n","$Lc","\n","$Ld","\n","$Le"],"$Lf",null]}],"$L10"]}]}]]}]}],"$L11"],["$L12","$L13","$L14"],"$L15"]}],"loading":null,"isPartial":false}
4:["$","code","code-0",{"className":"rounded bg-secondary px-1.5 py-0.5 text-[0.9em] text-foreground","children":"async def"}]
5:["$","code","code-1",{"className":"rounded bg-secondary px-1.5 py-0.5 text-[0.9em] text-foreground","children":"async def"}]
6:["$","code","code-2",{"className":"rounded bg-secondary px-1.5 py-0.5 text-[0.9em] text-foreground","children":"sqlite3.connect"}]
7:["$","h2","h2-1",{"className":"mt-12 text-2xl font-semibold leading-snug text-foreground first:mt-0","children":"The approach"}]
8:["$","p","p-2",{"className":"mt-4 text-base leading-8 md:text-lg first:mt-0 first:text-xl first:leading-relaxed first:text-foreground md:first:text-2xl","children":["Python's ",["$","code","code-0",{"className":"rounded bg-secondary px-1.5 py-0.5 text-[0.9em] text-foreground","children":"asyncio"}]," provides ",["$","code","code-1",{"className":"rounded bg-secondary px-1.5 py-0.5 text-[0.9em] text-foreground","children":"run_in_executor"}]," for exactly this case. It dispatches a callable to a thread pool and returns an awaitable, giving the event loop back while the blocking call runs on a worker thread."]}]
9:["$","div","pre-0",{"style":{"background":"hsl(220, 13%, 18%)","color":"hsl(220, 14%, 71%)","textShadow":"0 1px rgba(0, 0, 0, 0.3)","fontFamily":"\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace","direction":"ltr","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","lineHeight":"1.5","MozTabSize":"2","OTabSize":"2","tabSize":"2","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1rem","margin":"0.5em 0","overflow":"auto","borderRadius":"0.5rem","marginTop":"1.25rem","marginBottom":0,"border":"1px solid hsl(var(--border))","fontSize":"0.875rem"},"children":["$","code",null,{"style":{"whiteSpace":"pre","fontFamily":"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace"},"children":[false,[["$","span","code-segment-0",{"className":"token","style":{"color":"hsl(286, 60%, 67%)"},"children":["import"]}],["$","span","code-segment-1",{"style":{},"children":[" asyncio\n"]}],["$","span","code-segment-2",{"style":{},"children":[""]}],["$","span","code-segment-3",{"className":"token","style":{"color":"hsl(286, 60%, 67%)"},"children":["import"]}],["$","span","code-segment-4",{"style":{},"children":[" sqlite3\n"]}],"\n",["$","span","code-segment-6",{"style":{},"children":[""]}],["$","span","code-segment-7",{"className":"token","style":{"color":"hsl(286, 60%, 67%)"},"children":["def"]}],["$","span","code-segment-8",{"style":{},"children":[" "]}],["$","span","code-segment-9",{"className":"token","style":{"color":"hsl(207, 82%, 66%)"},"children":["_query_sync"]}],["$","span","code-segment-10",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":["("]}],["$","span","code-segment-11",{"style":{},"children":["db_path"]}],["$","span","code-segment-12",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":[":"]}],["$","span","code-segment-13",{"style":{},"children":[" "]}],["$","span","code-segment-14",{"className":"token","style":{"color":"hsl(95, 38%, 62%)"},"children":["str"]}],["$","span","code-segment-15",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":[","]}],["$","span","code-segment-16",{"style":{},"children":[" key"]}],["$","span","code-segment-17",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":[":"]}],["$","span","code-segment-18",{"style":{},"children":[" "]}],["$","span","code-segment-19",{"className":"token","style":{"color":"hsl(95, 38%, 62%)"},"children":["str"]}],["$","span","code-segment-20",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":[")"]}],["$","span","code-segment-21",{"style":{},"children":[" "]}],["$","span","code-segment-22",{"className":"token","style":{"color":"hsl(207, 82%, 66%)"},"children":["-"]}],["$","span","code-segment-23",{"className":"token","style":{"color":"hsl(207, 82%, 66%)"},"children":[">"]}],["$","span","code-segment-24",{"style":{},"children":[" "]}],["$","span","code-segment-25",{"className":"token","style":{"color":"hsl(95, 38%, 62%)"},"children":["str"]}],["$","span","code-segment-26",{"style":{},"children":[" "]}],["$","span","code-segment-27",{"className":"token","style":{"color":"hsl(207, 82%, 66%)"},"children":["|"]}],["$","span","code-segment-28",{"style":{},"children":[" "]}],["$","span","code-segment-29",{"className":"token","style":{"color":"hsl(29, 54%, 61%)"},"children":["None"]}],["$","span","code-segment-30",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":[":"]}],["$","span","code-segment-31",{"style":{},"children":["\n"]}],["$","span","code-segment-32",{"style":{},"children":["    "]}],["$","span","code-segment-33",{"className":"token","style":{"color":"hsl(286, 60%, 67%)"},"children":["if"]}],["$","span","code-segment-34",{"style":{},"children":[" "]}],["$","span","code-segment-35",{"className":"token","style":{"color":"hsl(286, 60%, 67%)"},"children":["not"]}],["$","span","code-segment-36",{"style":{},"children":[" os"]}],["$","span","code-segment-37",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":["."]}],["$","span","code-segment-38",{"style":{},"children":["path"]}],["$","span","code-segment-39",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":["."]}],["$","span","code-segment-40",{"style":{},"children":["exists"]}],["$","span","code-segment-41",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":["("]}],["$","span","code-segment-42",{"style":{},"children":["db_path"]}],["$","span","code-segment-43",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":[")"]}],"$L16","$L17","$L18","$L19","$L1a","$L1b","$L1c","$L1d","$L1e","$L1f","$L20","$L21","$L22","$L23","$L24","$L25","$L26","$L27","$L28","$L29","$L2a","$L2b","$L2c","$L2d","$L2e","$L2f","$L30","$L31","$L32","$L33","$L34","$L35","$L36","$L37","$L38","$L39","$L3a","$L3b","$L3c","$L3d","$L3e","$L3f","$L40","$L41","$L42","$L43","$L44","$L45","$L46","$L47","$L48","$L49","$L4a","$L4b","$L4c","$L4d","$L4e","$L4f","$L50","$L51","$L52","$L53","\n","$L54","$L55","$L56","$L57","$L58","$L59","$L5a","$L5b","$L5c","$L5d","$L5e","$L5f","$L60","$L61","$L62","$L63","$L64","$L65","$L66","$L67","$L68","$L69","$L6a","$L6b","$L6c","$L6d","$L6e","$L6f","$L70","$L71","$L72","$L73","$L74","$L75","$L76","$L77","$L78","$L79","$L7a","$L7b","$L7c","$L7d","$L7e","$L7f","$L80"]]}]}]
a:["$","p","p-3",{"className":"mt-4 text-base leading-8 md:text-lg first:mt-0 first:text-xl first:leading-relaxed first:text-foreground md:first:text-2xl","children":["The synchronous function runs in the default ",["$","code","code-0",{"className":"rounded bg-secondary px-1.5 py-0.5 text-[0.9em] text-foreground","children":"ThreadPoolExecutor"}]," (sized to ",["$","code","code-1",{"className":"rounded bg-secondary px-1.5 py-0.5 text-[0.9em] text-foreground","children":"min(32, cpu_count + 4)"}]," on CPython). The event loop is free the entire time. If you need more control over thread count, pass a custom executor as the first argument instead of ",["$","code","code-2",{"className":"rounded bg-secondary px-1.5 py-0.5 text-[0.9em] text-foreground","children":"None"}],"."]}]
b:["$","p","p-4",{"className":"mt-4 text-base leading-8 md:text-lg first:mt-0 first:text-xl first:leading-relaxed first:text-foreground md:first:text-2xl","children":["Two things worth noting: first, ",["$","code","code-0",{"className":"rounded bg-secondary px-1.5 py-0.5 text-[0.9em] text-foreground","children":"get_running_loop()"}]," is the correct call inside an ",["$","code","code-1",{"className":"rounded bg-secondary px-1.5 py-0.5 text-[0.9em] text-foreground","children":"async def"}]," — ",["$","code","code-2",{"className":"rounded bg-secondary px-1.5 py-0.5 text-[0.9em] text-foreground","children":"get_event_loop()"}]," is deprecated in 3.10+ and raises a DeprecationWarning in 3.12. Second, the synchronous function must not touch any asyncio primitives; it runs in a thread, not a coroutine, and mixing the two without explicit synchronization is undefined behavior."]}]
c:["$","h2","h2-2",{"className":"mt-12 text-2xl font-semibold leading-snug text-foreground first:mt-0","children":"What I learned"}]
d:["$","p","p-5",{"className":"mt-4 text-base leading-8 md:text-lg first:mt-0 first:text-xl first:leading-relaxed first:text-foreground md:first:text-2xl","children":["The tell is latency correlation rather than absolute latency. If a short database call causes long-tail spikes in ",["$","em","em-0",{"children":"unrelated"}]," routes, the event loop is blocked, not the database. The fix is always the same shape: extract the blocking code into a plain function, hand it to ",["$","code","code-0",{"className":"rounded bg-secondary px-1.5 py-0.5 text-[0.9em] text-foreground","children":"run_in_executor"}],", await the result."]}]
e:["$","p","p-6",{"className":"mt-4 text-base leading-8 md:text-lg first:mt-0 first:text-xl first:leading-relaxed first:text-foreground md:first:text-2xl","children":["SQLite is the quiet offender here because it looks fast. A 1ms read feels negligible, but at 100 req/s you are blocking the loop for 100ms every second — and that compounds with every other blocking call in the same process. The rule is simple: anything that touches the filesystem or a socket inside an ",["$","code","code-0",{"className":"rounded bg-secondary px-1.5 py-0.5 text-[0.9em] text-foreground","children":"async def"}]," body belongs in an executor."]}]
f:["$","div",null,{"className":"mt-14 border-t border-border pt-8","children":["$","$L3",null,{"href":"/platform","className":"inline-flex items-center text-sm font-medium text-primary transition-colors hover:text-primary/80","children":["Start a build",["$","svg",null,{"xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-arrow-right ml-2 h-4 w-4","aria-hidden":"true","children":[["$","path","1ays0h",{"d":"M5 12h14"}],["$","path","xquz4c",{"d":"m12 5 7 7-7 7"}],"$undefined"]}]]}]}]
10:["$","aside",null,{"className":"hidden lg:block","children":["$","div",null,{"className":"sticky top-24 space-y-4","children":[["$","h3",null,{"className":"text-xs font-semibold uppercase tracking-wider text-primary","children":["More in ","Concurrency"]}],["$","div",null,{"className":"space-y-4","children":[["$","$L3","bcrypt-async-event-loop",{"href":"/blog/bcrypt-async-event-loop","className":"block overflow-hidden rounded-lg border border-border bg-card transition-colors hover:border-primary/40","children":[["$","div",null,{"className":"relative aspect-[16/9] overflow-hidden bg-secondary/70","children":[["$","img",null,{"src":"/blog/posts/bcrypt-async-event-loop/hero.jpg","alt":"A solitary traffic light glowing red over an empty asphalt road at dusk, no cars, no people, sharp editorial photography.","className":"h-full w-full object-cover","loading":"lazy","decoding":"async"}],["$","img",null,{"src":"/blog/posts/logo.png","alt":"","aria-hidden":"true","className":"pointer-events-none absolute right-2 top-2 h-[24px] w-[24px] mix-blend-screen"}]]}],["$","div",null,{"className":"p-4","children":[["$","p",null,{"className":"text-xs font-medium text-primary","children":"Concurrency"}],["$","p",null,{"className":"mt-1 text-xs text-muted-foreground","children":["2026-W20"," · ","4 min"]}],["$","p",null,{"className":"mt-2 line-clamp-2 text-sm font-semibold leading-snug text-foreground","children":"bcrypt in an Async Codebase — The Three Places It Bites You"}]]}]]}],["$","$L3","toctou-async-database-handlers",{"href":"/blog/toctou-async-database-handlers","className":"block overflow-hidden rounded-lg border border-border bg-card transition-colors hover:border-primary/40","children":[["$","div",null,{"className":"relative aspect-[16/9] overflow-hidden bg-secondary/70","children":[["$","img",null,{"src":"/blog/posts/toctou-async-database-handlers/hero.jpg","alt":"A close-up macro shot of two identical brass keys sliding into the same antique brass door lock simultaneously against a dark wooden door, dramatic side lighting, no people, sharp editorial focus.","className":"h-full w-full object-cover","loading":"lazy","decoding":"async"}],["$","img",null,{"src":"/blog/posts/logo.png","alt":"","aria-hidden":"true","className":"pointer-events-none absolute right-2 top-2 h-[24px] w-[24px] mix-blend-screen"}]]}],["$","div",null,{"className":"p-4","children":[["$","p",null,{"className":"text-xs font-medium text-primary","children":"Concurrency"}],["$","p",null,{"className":"mt-1 text-xs text-muted-foreground","children":["2026-W20"," · ","4 min"]}],["$","p",null,{"className":"mt-2 line-clamp-2 text-sm font-semibold leading-snug text-foreground","children":"TOCTOU Races in Async Database Handlers"}]]}]]}],["$","$L3","fire-and-forget-asyncio",{"href":"/blog/fire-and-forget-asyncio","className":"block overflow-hidden rounded-lg border border-border bg-card transition-colors hover:border-primary/40","children":[["$","div",null,{"className":"relative aspect-[16/9] overflow-hidden bg-secondary/70","children":[["$","img",null,{"src":"/blog/posts/fire-and-forget-asyncio/hero.jpg","alt":"A paper airplane mid-flight against a slate-grey wall, sharp focus on the folded nose, no people, no hands, dramatic single-source side light, editorial.","className":"h-full w-full object-cover","loading":"lazy","decoding":"async"}],["$","img",null,{"src":"/blog/posts/logo.png","alt":"","aria-hidden":"true","className":"pointer-events-none absolute right-2 top-2 h-[24px] w-[24px] mix-blend-screen"}]]}],["$","div",null,{"className":"p-4","children":[["$","p",null,{"className":"text-xs font-medium text-primary","children":"Concurrency"}],["$","p",null,{"className":"mt-1 text-xs text-muted-foreground","children":["2026-W20"," · ","5 min"]}],["$","p",null,{"className":"mt-2 line-clamp-2 text-sm font-semibold leading-snug text-foreground","children":"Fire-and-Forget asyncio.create_task Is a Reliability Trap"}]]}]]}]]}],["$","$L3",null,{"href":"/blog?category=concurrency","className":"inline-flex items-center text-sm font-medium text-primary transition-colors hover:text-primary/80","children":["Read all in ","Concurrency","$L81"]}]]}]}]
11:["$","$L82",null,{}]
12:["$","script","script-0",{"src":"/_next/static/chunks/94245cbda44972fe.js","async":true}]
13:["$","script","script-1",{"src":"/_next/static/chunks/af778fff4a0f4be6.js","async":true}]
14:["$","script","script-2",{"src":"/_next/static/chunks/b096b037d08e2f31.js","async":true}]
15:["$","$L83",null,{"children":["$","$84",null,{"name":"Next.MetadataOutlet","children":"$@85"}]}]
16:["$","span","code-segment-44",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":[":"]}]
17:["$","span","code-segment-45",{"style":{},"children":["\n"]}]
18:["$","span","code-segment-46",{"style":{},"children":["        "]}]
19:["$","span","code-segment-47",{"className":"token","style":{"color":"hsl(286, 60%, 67%)"},"children":["return"]}]
1a:["$","span","code-segment-48",{"style":{},"children":[" "]}]
1b:["$","span","code-segment-49",{"className":"token","style":{"color":"hsl(29, 54%, 61%)"},"children":["None"]}]
1c:["$","span","code-segment-50",{"style":{},"children":["\n"]}]
1d:["$","span","code-segment-51",{"style":{},"children":["    "]}]
1e:["$","span","code-segment-52",{"className":"token","style":{"color":"hsl(286, 60%, 67%)"},"children":["with"]}]
1f:["$","span","code-segment-53",{"style":{},"children":[" sqlite3"]}]
20:["$","span","code-segment-54",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":["."]}]
21:["$","span","code-segment-55",{"style":{},"children":["connect"]}]
22:["$","span","code-segment-56",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":["("]}]
23:["$","span","code-segment-57",{"style":{},"children":["db_path"]}]
24:["$","span","code-segment-58",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":[","]}]
25:["$","span","code-segment-59",{"style":{},"children":[" timeout"]}]
26:["$","span","code-segment-60",{"className":"token","style":{"color":"hsl(207, 82%, 66%)"},"children":["="]}]
27:["$","span","code-segment-61",{"className":"token","style":{"color":"hsl(29, 54%, 61%)"},"children":["5"]}]
28:["$","span","code-segment-62",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":[")"]}]
29:["$","span","code-segment-63",{"style":{},"children":[" "]}]
2a:["$","span","code-segment-64",{"className":"token","style":{"color":"hsl(286, 60%, 67%)"},"children":["as"]}]
2b:["$","span","code-segment-65",{"style":{},"children":[" con"]}]
2c:["$","span","code-segment-66",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":[":"]}]
2d:["$","span","code-segment-67",{"style":{},"children":["\n"]}]
2e:["$","span","code-segment-68",{"style":{},"children":["        row "]}]
2f:["$","span","code-segment-69",{"className":"token","style":{"color":"hsl(207, 82%, 66%)"},"children":["="]}]
30:["$","span","code-segment-70",{"style":{},"children":[" con"]}]
31:["$","span","code-segment-71",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":["."]}]
32:["$","span","code-segment-72",{"style":{},"children":["execute"]}]
33:["$","span","code-segment-73",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":["("]}]
34:["$","span","code-segment-74",{"style":{},"children":["\n"]}]
35:["$","span","code-segment-75",{"style":{},"children":["            "]}]
36:["$","span","code-segment-76",{"className":"token","style":{"color":"hsl(95, 38%, 62%)"},"children":["\"SELECT value FROM cache WHERE key = ? LIMIT 1\""]}]
37:["$","span","code-segment-77",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":[","]}]
38:["$","span","code-segment-78",{"style":{},"children":["\n"]}]
39:["$","span","code-segment-79",{"style":{},"children":["            "]}]
3a:["$","span","code-segment-80",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":["("]}]
3b:["$","span","code-segment-81",{"style":{},"children":["key"]}]
3c:["$","span","code-segment-82",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":[","]}]
3d:["$","span","code-segment-83",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":[")"]}]
3e:["$","span","code-segment-84",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":[","]}]
3f:["$","span","code-segment-85",{"style":{},"children":["\n"]}]
40:["$","span","code-segment-86",{"style":{},"children":["        "]}]
41:["$","span","code-segment-87",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":[")"]}]
42:["$","span","code-segment-88",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":["."]}]
43:["$","span","code-segment-89",{"style":{},"children":["fetchone"]}]
44:["$","span","code-segment-90",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":["("]}]
45:["$","span","code-segment-91",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":[")"]}]
46:["$","span","code-segment-92",{"style":{},"children":["\n"]}]
47:["$","span","code-segment-93",{"style":{},"children":["    "]}]
48:["$","span","code-segment-94",{"className":"token","style":{"color":"hsl(286, 60%, 67%)"},"children":["return"]}]
49:["$","span","code-segment-95",{"style":{},"children":[" row"]}]
4a:["$","span","code-segment-96",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":["["]}]
4b:["$","span","code-segment-97",{"className":"token","style":{"color":"hsl(29, 54%, 61%)"},"children":["0"]}]
4c:["$","span","code-segment-98",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":["]"]}]
4d:["$","span","code-segment-99",{"style":{},"children":[" "]}]
4e:["$","span","code-segment-100",{"className":"token","style":{"color":"hsl(286, 60%, 67%)"},"children":["if"]}]
4f:["$","span","code-segment-101",{"style":{},"children":[" row "]}]
50:["$","span","code-segment-102",{"className":"token","style":{"color":"hsl(286, 60%, 67%)"},"children":["else"]}]
51:["$","span","code-segment-103",{"style":{},"children":[" "]}]
52:["$","span","code-segment-104",{"className":"token","style":{"color":"hsl(29, 54%, 61%)"},"children":["None"]}]
53:["$","span","code-segment-105",{"style":{},"children":["\n"]}]
54:["$","span","code-segment-107",{"style":{},"children":[""]}]
55:["$","span","code-segment-108",{"className":"token decorator annotation","style":{"color":"hsl(220, 14%, 71%)"},"children":["@app"]}]
56:["$","span","code-segment-109",{"className":"token decorator annotation","style":{"color":"hsl(220, 14%, 71%)"},"children":["."]}]
57:["$","span","code-segment-110",{"className":"token decorator annotation","style":{"color":"hsl(220, 14%, 71%)"},"children":["post"]}]
58:["$","span","code-segment-111",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":["("]}]
59:["$","span","code-segment-112",{"className":"token","style":{"color":"hsl(95, 38%, 62%)"},"children":["\"/webhook\""]}]
5a:["$","span","code-segment-113",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":[")"]}]
5b:["$","span","code-segment-114",{"style":{},"children":["\n"]}]
5c:["$","span","code-segment-115",{"style":{},"children":[""]}]
5d:["$","span","code-segment-116",{"className":"token","style":{"color":"hsl(286, 60%, 67%)"},"children":["async"]}]
5e:["$","span","code-segment-117",{"style":{},"children":[" "]}]
5f:["$","span","code-segment-118",{"className":"token","style":{"color":"hsl(286, 60%, 67%)"},"children":["def"]}]
60:["$","span","code-segment-119",{"style":{},"children":[" "]}]
61:["$","span","code-segment-120",{"className":"token","style":{"color":"hsl(207, 82%, 66%)"},"children":["webhook"]}]
62:["$","span","code-segment-121",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":["("]}]
63:["$","span","code-segment-122",{"style":{},"children":["request"]}]
64:["$","span","code-segment-123",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":[":"]}]
65:["$","span","code-segment-124",{"style":{},"children":[" Request"]}]
66:["$","span","code-segment-125",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":[")"]}]
67:["$","span","code-segment-126",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":[":"]}]
68:["$","span","code-segment-127",{"style":{},"children":["\n"]}]
69:["$","span","code-segment-128",{"style":{},"children":["    loop "]}]
6a:["$","span","code-segment-129",{"className":"token","style":{"color":"hsl(207, 82%, 66%)"},"children":["="]}]
6b:["$","span","code-segment-130",{"style":{},"children":[" asyncio"]}]
6c:["$","span","code-segment-131",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":["."]}]
6d:["$","span","code-segment-132",{"style":{},"children":["get_running_loop"]}]
6e:["$","span","code-segment-133",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":["("]}]
6f:["$","span","code-segment-134",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":[")"]}]
70:["$","span","code-segment-135",{"style":{},"children":["\n"]}]
71:["$","span","code-segment-136",{"style":{},"children":["    value "]}]
72:["$","span","code-segment-137",{"className":"token","style":{"color":"hsl(207, 82%, 66%)"},"children":["="]}]
73:["$","span","code-segment-138",{"style":{},"children":[" "]}]
74:["$","span","code-segment-139",{"className":"token","style":{"color":"hsl(286, 60%, 67%)"},"children":["await"]}]
75:["$","span","code-segment-140",{"style":{},"children":[" loop"]}]
76:["$","span","code-segment-141",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":["."]}]
77:["$","span","code-segment-142",{"style":{},"children":["run_in_executor"]}]
78:["$","span","code-segment-143",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":["("]}]
79:["$","span","code-segment-144",{"className":"token","style":{"color":"hsl(29, 54%, 61%)"},"children":["None"]}]
7a:["$","span","code-segment-145",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":[","]}]
7b:["$","span","code-segment-146",{"style":{},"children":[" _query_sync"]}]
7c:["$","span","code-segment-147",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":[","]}]
7d:["$","span","code-segment-148",{"style":{},"children":[" DB_PATH"]}]
7e:["$","span","code-segment-149",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":[","]}]
7f:["$","span","code-segment-150",{"style":{},"children":[" key"]}]
80:["$","span","code-segment-151",{"className":"token","style":{"color":"hsl(220, 14%, 71%)"},"children":[")"]}]
81:["$","svg",null,{"xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-arrow-right ml-2 h-4 w-4","aria-hidden":"true","children":[["$","path","1ays0h",{"d":"M5 12h14"}],["$","path","xquz4c",{"d":"m12 5 7 7-7 7"}],"$undefined"]}]
85:null
