Skip to content

feat: asgi.entrypoint syntax sugar for nicer asgi apps - #225

Open
dom96 wants to merge 1 commit into
mainfrom
dominik/better-asgi-experience
Open

feat: asgi.entrypoint syntax sugar for nicer asgi apps#225
dom96 wants to merge 1 commit into
mainfrom
dominik/better-asgi-experience

Conversation

@dom96

@dom96 dom96 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

This changes a fastapi hello world from:

from fastapi import FastAPI

app = FastAPI()

@app.get("/")
def read_root():
    return {"Hello": "World"}

import asgi
from workers import WorkerEntrypoint

class Default(WorkerEntrypoint):
    async def fetch(self, request):
        return await asgi.fetch(app, request, self.env)

To:

from fastapi import FastAPI

app = FastAPI()

@app.get("/")
def read_root():
    return {"Hello": "World"}

import asgi
Default = asgi.entrypoint(app)

Also adds a websockets fastapi test.

@ask-bonk

ask-bonk Bot commented Aug 21, 2026

Copy link
Copy Markdown

LGTM

github run

@hoodmane hoodmane left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants