skills/bossjones/uvicorn/SKILL.md
ASGI server for Python web applications - Fast, production-ready server for async frameworks
npx skillsauth add aiskillstore/marketplace uvicornInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Uvicorn is a lightning-fast ASGI server implementation, using uvloop and httptools. It's the go-to server for modern Python async web frameworks.
# Run ASGI app
uv run uvicorn main:app
# With host/port
uv run uvicorn main:app --host 0.0.0.0 --port 8000
# Development with auto-reload
uv run uvicorn main:app --reload
# main.py
async def app(scope, receive, send):
assert scope['type'] == 'http'
await send({
'type': 'http.response.start',
'status': 200,
'headers': [(b'content-type', b'text/plain')],
})
await send({
'type': 'http.response.body',
'body': b'Hello, World!',
})
# main.py
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
async def root():
return {"message": "Hello World"}
uv run uvicorn main:app --reload
# main.py
from fastapi import FastAPI
def create_app():
app = FastAPI()
# Configure app
return app
app = create_app()
uv run uvicorn --factory main:create_app
import uvicorn
# Simple run
if __name__ == "__main__":
uvicorn.run("main:app", host="0.0.0.0", port=8000, reload=True)
import asyncio
import uvicorn
async def main():
config = uvicorn.Config("main:app", port=5000, log_level="info")
server = uvicorn.Server(config)
await server.serve()
if __name__ == "__main__":
asyncio.run(main())
export UVICORN_HOST="0.0.0.0"
export UVICORN_PORT="8000"
export UVICORN_RELOAD="true"
uv run uvicorn main:app
# Use multiple worker processes
uv run uvicorn main:app --workers 4
# Note: Can't use --reload with --workers
# Install gunicorn
uv add gunicorn
# Run with Gunicorn process manager
uv run gunicorn main:app -w 4 -k uvicorn.workers.UvicornWorker
uv run uvicorn main:app --ssl-keyfile=./key.pem --ssl-certfile=./cert.pem
uv run uvicorn main:app --uds /tmp/uvicorn.sock
uv run uvicorn main:app \
--host 0.0.0.0 \
--port 8000 \
--reload \
--reload-dir ./app \
--log-level info \
--access-log \
--workers 4
--host: Bind host (default: 127.0.0.1)--port: Bind port (default: 8000)--reload: Enable auto-reload for development--workers: Number of worker processes--log-level: Logging level (critical, error, warning, info, debug)--access-log: Enable access logging--factory: Treat app as application factoryFROM python:3.12-slim
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install -r requirements.txt
# Copy application
COPY . .
# Run with uvicorn
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
services:
app:
build: .
ports:
- "8000:8000"
environment:
- UVICORN_RELOAD=true
volumes:
- .:/app
command: uvicorn main:app --host 0.0.0.0 --port 8000 --reload
--app-dir--reload-dir--workers for production, avoid with --reloaduv run uvicorn main:app --reload --log-level debug
@app.get("/health")
async def health():
return {"status": "healthy"}
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.