{
 "kind": "tool",
 "slug": "klein",
 "path": "tools/klein/",
 "name": "Klein",
 "maker": null,
 "density": "basic",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "HTTP servers and APIs",
   "tools/http-servers/"
  ]
 ],
 "lead": "Microframework combining Werkzeug routing with Twisted async capabilities.",
 "chips": [
  {
   "label": "HTTP servers and APIs",
   "path": "tools/http-servers/"
  },
  {
   "label": "PYPI"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "pip install klein"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/twisted/klein"
  },
  {
   "label": "Website",
   "href": "https://github.com/twisted/klein"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "MIT",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": null,
   "note": "License from PyPI classifier.",
   "src": "https://github.com/twisted/klein"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Nov 16, 2026",
   "note": "Latest GitHub release May 3, 2023. ",
   "src": "https://github.com/twisted/klein"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "Not in our scan",
   "status": "info",
   "sub": "#89 of 102 in its category",
   "note": "Dependency in 0 public GitHub projects set up for AI coding agents that we scanned (0.0%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Install only",
   "status": "info",
   "sub": null,
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": null
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What Klein does",
   "parts": [
    {
     "t": "prose",
     "text": "Microframework combining Werkzeug routing with Twisted async capabilities."
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "Klein popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "32",
       "of": "/ 100",
       "l": "Gid Score, #3942 overall"
      },
      {
       "n": "9,098",
       "l": "downloads a week, pypi"
      },
      {
       "n": "843",
       "l": "GitHub stars"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How Klein is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "Klein is a dependency in 0 of the 6,258 public GitHub projects set up for AI coding agents that we scanned, too few to describe it from them alone. Our scan also samples projects by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750); counting those, it appears in 23 projects, and what it is used with below comes from all of them.",
      "The most used alternative in our scan is FastAPI (465 projects).",
      "Projects that use it most often also use coloredlogs (100.0%), gevent (100.0%), jsonschema (100.0%)."
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 100.0% of its projects",
       "v": "coloredlogs",
       "path": "tools/coloredlogs/"
      },
      {
       "l": "In 100.0% of its projects",
       "v": "gevent",
       "path": "tools/gevent/"
      },
      {
       "l": "In 100.0% of its projects",
       "v": "jsonschema",
       "path": "tools/jsonschema/"
      },
      {
       "l": "In 95.7% of its projects",
       "v": "Matplotlib",
       "path": "tools/matplotlib/"
      },
      {
       "l": "In 95.7% of its projects",
       "v": "Requests",
       "path": "tools/requests-py/"
      },
      {
       "l": "In 95.7% of its projects",
       "v": "scikit-learn",
       "path": "tools/scikit-learn/"
      },
      {
       "l": "In 95.7% of its projects",
       "v": "simplejson",
       "path": "tools/simplejson/"
      },
      {
       "l": "In 95.7% of its projects",
       "v": "tqdm",
       "path": "tools/tqdm/"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "usage",
   "h2": "More about Klein",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "More in HTTP servers and APIs",
       "path": "tools/http-servers/",
       "items": [
        {
         "text": "Uvicorn",
         "path": "tools/uvicorn/"
        },
        {
         "text": "Express",
         "path": "tools/express/"
        },
        {
         "text": "cors",
         "path": "tools/cors/"
        },
        {
         "text": "python-multipart",
         "path": "tools/python-multipart/"
        },
        {
         "text": "Hono",
         "path": "tools/hono/"
        },
        {
         "text": "express-rate-limit",
         "path": "tools/express-rate-limit/"
        },
        {
         "text": "multer",
         "path": "tools/multer/"
        },
        {
         "text": "Gunicorn",
         "path": "tools/gunicorn/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "Klein",
       "me": true,
       "facts": [
        "MIT",
        "Gid 32",
        "9,098/wk"
       ]
      },
      {
       "name": "FastAPI",
       "why": "High-performance Python web framework with automatic API docs and async support.",
       "path": "tools/fastapi/",
       "facts": [
        "MIT",
        "Gid 91",
        "136M/wk"
       ]
      },
      {
       "name": "Flask",
       "why": "Lightweight Python web framework for building web applications and APIs.",
       "path": "tools/flask/",
       "facts": [
        "BSD-3-Clause",
        "Gid 85",
        "40.4M/wk"
       ]
      },
      {
       "name": "Starlette",
       "why": "Lightweight ASGI web framework for building Python APIs and web applications.",
       "path": "tools/starlette/",
       "facts": [
        "BSD-3-Clause",
        "Gid 78",
        "174M/wk"
       ]
      },
      {
       "name": "Django",
       "why": "High-level Python web framework for rapid development with clean design.",
       "path": "tools/django/",
       "facts": [
        "BSD-3-Clause",
        "Gid 64",
        "12.1M/wk"
       ]
      },
      {
       "name": "Tornado",
       "why": "High-performance Python web framework and async networking library for building servers.",
       "path": "tools/tornado/",
       "facts": [
        "Apache-2.0",
        "Gid 76",
        "29.1M/wk"
       ]
      }
     ],
     "more": "Compare Klein with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "install",
     "intro": "Install it.",
     "code": "pip install klein"
    },
    {
     "t": "gap",
     "text": "No step-by-step start for Klein yet: we have not written its hand-checked card."
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "pypi klein"
  ],
  [
   "Category",
   "HTTP servers and APIs"
  ],
  [
   "License",
   "MIT"
  ],
  [
   "Gid Score",
   "31.7"
  ],
  [
   "Rank in category",
   "#89 of 102"
  ],
  [
   "GitHub",
   "twisted/klein"
  ],
  [
   "Last change",
   "Nov 16, 2026"
  ]
 ],
 "good": [],
 "checked_line": "From the package registry, GitHub and our scan of public agent projects; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/twisted.png"
}