Skip to content

Instantly share code, notes, and snippets.

@ycd
Last active February 11, 2023 13:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ycd/82a7992c894f3fd97e4bc3a82e32070d to your computer and use it in GitHub Desktop.
Save ycd/82a7992c894f3fd97e4bc3a82e32070d to your computer and use it in GitHub Desktop.
FastAPI One Liner
app = (lambda fastapi, typing: (lambda app: (app,app.get("/")(lambda: {"Quite ": "ugly"}),app.post("/annotate",)(lambda x, y: {"How to annotate this": int(x) + int(y)}),)[0])(fastapi.FastAPI()))(__import__("fastapi"), __import__("typing"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment