{
 "kind": "tool",
 "slug": "structlog",
 "path": "tools/structlog/",
 "name": "structlog",
 "maker": null,
 "density": "basic",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "Logging, monitoring and analytics",
   "tools/observability-analytics/"
  ]
 ],
 "lead": "Structured logging library for Python with composable processors.",
 "chips": [
  {
   "label": "Logging, monitoring and analytics",
   "path": "tools/observability-analytics/"
  },
  {
   "label": "PYPI"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "pip install structlog"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/hynek/structlog"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "MIT OR Apache-2.0",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": null,
   "note": "License from PyPI license expression.",
   "src": "https://github.com/hynek/structlog"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Nov 22, 2026",
   "note": "Latest GitHub release Jun 6, 2026. ",
   "src": "https://github.com/hynek/structlog"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "71 projects",
   "status": "info",
   "sub": "#7 of 121 in its category",
   "note": "Dependency in 71 public GitHub projects set up for AI coding agents that we scanned (1.1%).",
   "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 structlog does",
   "parts": [
    {
     "t": "prose",
     "text": "Structured logging library for Python with composable processors."
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "structlog popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "69",
       "of": "/ 100",
       "l": "Gid Score, #452 overall"
      },
      {
       "n": "32.1M",
       "l": "downloads a week, pypi"
      },
      {
       "n": "4,996",
       "l": "GitHub stars"
      },
      {
       "n": "71",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "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 structlog is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "structlog is a dependency in 71 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (4.4% of the 1,623 Python ones), #7 of 121 in logging, monitoring and analytics.",
      "Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 286; those are left out of every share on this page.",
      "The most used alternative in our scan is Loguru (66 projects).",
      "Projects that use it most often also use Pydantic (78.9%), Pydantic Settings (57.7%), Uvicorn (56.3%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "43 projects, 1.3%",
       "v": "Claude Code",
       "path": "agents/claude-code/"
      },
      {
       "l": "39 projects, 1.3%",
       "v": "GitHub Copilot",
       "path": "agents/github-copilot/"
      },
      {
       "l": "27 projects, 1.1%",
       "v": "Cursor",
       "path": "agents/cursor/"
      },
      {
       "l": "8 projects, 1.7%",
       "v": "Gemini CLI",
       "path": "agents/gemini-cli/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 78.9% of its projects",
       "v": "Pydantic",
       "path": "tools/pydantic/"
      },
      {
       "l": "In 57.7% of its projects",
       "v": "Pydantic Settings",
       "path": "tools/pydantic-settings/"
      },
      {
       "l": "In 56.3% of its projects",
       "v": "Uvicorn",
       "path": "tools/uvicorn/"
      },
      {
       "l": "In 54.9% of its projects",
       "v": "FastAPI",
       "path": "tools/fastapi/"
      },
      {
       "l": "In 53.5% of its projects",
       "v": "python-dotenv",
       "path": "tools/python-dotenv/"
      },
      {
       "l": "In 42.3% of its projects",
       "v": "httpx",
       "path": "tools/httpx/"
      },
      {
       "l": "In 40.8% of its projects",
       "v": "SQLAlchemy",
       "path": "tools/sqlalchemy/"
      },
      {
       "l": "In 40.8% of its projects",
       "v": "PyYAML",
       "path": "tools/pyyaml/"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "usage",
   "h2": "More about structlog",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Funding",
       "path": "tools/funding/",
       "items": [
        "GitHub Sponsors: https://github.com/hynek",
        "Tidelift: https://tidelift.com/funding/github/pypi/structlog",
        "thanks.dev: https://thanks.dev/u/gh/hynek",
        "Own page: https://hynek.me/say-thanks/",
        "48 GitHub sponsors"
       ]
      },
      {
       "title": "More in Logging, monitoring and analytics",
       "path": "tools/observability-analytics/",
       "items": [
        {
         "text": "Vercel Analytics",
         "path": "tools/vercel-analytics/"
        },
        {
         "text": "psutil",
         "path": "tools/psutil/"
        },
        {
         "text": "Vercel Speed Insights",
         "path": "tools/vercel-speed-insights/"
        },
        {
         "text": "Sentry for Next.js",
         "path": "tools/sentry-nextjs/"
        },
        {
         "text": "OpenTelemetry",
         "path": "tools/opentelemetry/"
        },
        {
         "text": "Pino",
         "path": "tools/pino/"
        },
        {
         "text": "PostHog JS",
         "path": "tools/posthog-js/"
        },
        {
         "text": "pino-pretty",
         "path": "tools/pino-pretty/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "structlog",
       "me": true,
       "facts": [
        "MIT OR Apache-2.0",
        "Gid 69",
        "32.1M/wk"
       ]
      },
      {
       "name": "Loguru",
       "why": "Simplified Python logging library with intuitive API and structured logging.",
       "path": "tools/loguru/",
       "facts": [
        "MIT",
        "Gid 77",
        "21.7M/wk"
       ]
      },
      {
       "name": "python-json-logger",
       "why": "JSON formatter for Python logging to emit structured logs for log aggregation.",
       "path": "tools/python-json-logger/",
       "facts": [
        "BSD-2-Clause",
        "Gid 67",
        "25.6M/wk"
       ]
      }
     ],
     "more": "Compare structlog with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "install",
     "intro": "Install it.",
     "code": "pip install structlog"
    },
    {
     "t": "gap",
     "text": "No step-by-step start for structlog yet: we have not written its hand-checked card."
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "pypi structlog"
  ],
  [
   "Category",
   "Logging, monitoring and analytics"
  ],
  [
   "License",
   "MIT OR Apache-2.0"
  ],
  [
   "Gid Score",
   "68.7"
  ],
  [
   "Rank in category",
   "#7 of 121"
  ],
  [
   "GitHub",
   "hynek/structlog"
  ],
  [
   "Last change",
   "Nov 22, 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/hynek.png"
}