CyberIntel ⬡ News
★ Saved ◆ Cyber Reads
← Back ◬ AI & Machine Learning Mar 22, 2026

Experimenting with Starlette 1.0 with Claude skills

Simon Willison Archived Mar 23, 2026 ✓ Full text saved

Starlette 1.0 is out ! This is a really big deal. I think Starlette may be the Python framework with the most usage compared to its relatively low brand recognition because Starlette is the foundation of FastAPI , which has attracted a huge amount of buzz that seems to have overshadowed Starlette itself. Kim Christie started working on Starlette in 2018 and it quickly became my favorite out of the new breed of Python ASGI frameworks. The only reason I didn't use it as the basis for my own Datase

Full text archived locally
✦ AI Summary · Claude Sonnet


    Simon Willison’s Weblog Subscribe Sponsored by: WorkOS — The infrastructure fast-growing B2B companies use to sell to Enterprise. Experimenting with Starlette 1.0 with Claude skills Starlette 1.0 is out! This is a really big deal. I think Starlette may be the Python framework with the most usage compared to its relatively low brand recognition because Starlette is the foundation of FastAPI, which has attracted a huge amount of buzz that seems to have overshadowed Starlette itself. Kim Christie started working on Starlette in 2018 and it quickly became my favorite out of the new breed of Python ASGI frameworks. The only reason I didn’t use it as the basis for my own Datasette project was that it didn’t yet promise stability, and I was determined to provide a stable API for Datasette’s own plugins... albeit I still haven’t been brave enough to ship my own 1.0 release (after 26 alphas and counting)! Then in September 2025 Marcelo Trylesinski announced that Starlette and Uvicorn were transferring to their GitHub account, in recognition of their many years of contributions and to make it easier for them to receive sponsorship against those projects. The 1.0 version has a few breaking changes compared to the 0.x series, described in the release notes for 1.0.0rc1 that came out in February. The most notable of these is a change to how code runs on startup and shutdown. Previously that was handled by on_startup and on_shutdown parameters, but the new system uses a neat lifespan mechanism instead based around an async context manager: @contextlib.asynccontextmanager async def lifespan(app): async with some_async_resource(): print("Run at startup!") yield print("Run on shutdown!") app = Starlette( routes=routes, lifespan=lifespan ) If you haven’t tried Starlette before it feels to me like an asyncio-native cross between Flask and Django, unsurprising since creator Kim Christie is also responsible for Django REST Framework. Crucially, this means you can write most apps as a single Python file, Flask style. This makes it really easy for LLMs to spit out a working Starlette app from a single prompt. There’s just one problem there: if 1.0 breaks compatibility with the Starlette code that the models have been trained on, how can we have them generate code that works with 1.0? I decided to see if I could get this working with a Skill. Building a Skill with Claude # Regular Claude Chat on claude.ai has skills, and one of those default skills is the skill-creator skill. This means Claude knows how to build its own skills. So I started a chat session and told it: Clone Starlette from GitHub—it just had its 1.0 release. Build a skill markdown document for this release which includes code examples of every feature. I didn’t even tell it where to find the repo, Starlette is widely enough known that I expected it could find it on its own. It ran git clone https://github.com/encode/starlette.git which is actually the old repository name, but GitHub handles redirects automatically so this worked just fine. The resulting skill document looked very thorough to me... and then I noticed a new button at the top I hadn’t seen before labelled “Copy to your skills”. So I clicked it: And now my regular Claude chat has access to that skill! A task management demo app # I started a new conversation and prompted: Build a task management app with Starlette, it should have projects and tasks and comments and labels And Claude did exactly that, producing a simple GitHub Issues clone using Starlette 1.0, a SQLite database (via aiosqlite) and a Jinja2 template. Claude even tested the app manually like this: cd /home/claude/taskflow && timeout 5 python -c " import asyncio from database import init_db asyncio.run(init_db()) print('DB initialized successfully') " 2>&1 pip install httpx --break-system-packages -q \ && cd /home/claude/taskflow && \ python -c " from starlette.testclient import TestClient from main import app client = TestClient(app) r = client.get('/api/stats') print('Stats:', r.json()) r = client.get('/api/projects') print('Projects:', len(r.json()), 'found') r = client.get('/api/tasks') print('Tasks:', len(r.json()), 'found') r = client.get('/api/labels') print('Labels:', len(r.json()), 'found') r = client.get('/api/tasks/1') t = r.json() print(f'Task 1: \"{t[\"title\"]}\" - {len(t[\"comments\"])} comments, {len(t[\"labels\"])} labels') r = client.post('/api/tasks', json={'title':'Test task','project_id':1,'priority':'high','label_ids':[1,2]}) print('Created task:', r.status_code, r.json()['title']) r = client.post('/api/comments', json={'task_id':1,'content':'Test comment'}) print('Created comment:', r.status_code) r = client.get('/') print('Homepage:', r.status_code, '- length:', len(r.text)) print('\nAll tests passed!') " For all of the buzz about Claude Code, it’s easy to overlook that Claude itself counts as a coding agent now, fully able to both write and then test the code that it is writing. Here’s what the resulting app looked like. The code is here in my research repository. Posted 22nd March 2026 at 11:57 pm · Follow me on Mastodon, Bluesky, Twitter or subscribe to my newsletter More recent articles Profiling Hacker News users based on their comments - 21st March 2026 Thoughts on OpenAI acquiring Astral and uv/ruff/ty - 19th March 2026 This is Experimenting with Starlette 1.0 with Claude skills by Simon Willison, posted on 22nd March 2026. open-source 297 python 1235 ai 1924 asgi 20 kim-christie 5 generative-ai 1706 llms 1672 ai-assisted-programming 365 claude 263 coding-agents 182 skills 12 agentic-engineering 32 starlette 13 Previous: Profiling Hacker News users based on their comments Monthly briefing Sponsor me for $10/month and get a curated email digest of the month's most important LLM developments. Pay me to send you less! Sponsor & subscribe Disclosures Colophon © 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
    💬 Team Notes
    Article Info
    Source
    Simon Willison
    Category
    ◬ AI & Machine Learning
    Published
    Mar 22, 2026
    Archived
    Mar 23, 2026
    Full Text
    ✓ Saved locally
    Open Original ↗