{
 "kind": "tool",
 "slug": "pyotp",
 "path": "tools/pyotp/",
 "name": "PyOTP",
 "maker": null,
 "density": "basic",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "Auth and security libraries",
   "tools/auth-security/"
  ]
 ],
 "lead": "Generate and validate one-time passwords (OTP) for two-factor authentication.",
 "chips": [
  {
   "label": "Auth and security libraries",
   "path": "tools/auth-security/"
  },
  {
   "label": "PYPI"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "pip install pyotp"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/pyauth/pyotp"
  },
  {
   "label": "Website",
   "href": "https://github.com/pyauth/pyotp"
  }
 ],
 "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 license expression.",
   "src": "https://github.com/pyauth/pyotp"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Nov 19, 2026",
   "note": "Latest GitHub release Nov 19, 2026. ",
   "src": "https://github.com/pyauth/pyotp"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "8 projects",
   "status": "info",
   "sub": "#57 of 141 in its category",
   "note": "Dependency in 8 public GitHub projects set up for AI coding agents that we scanned (0.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 PyOTP does",
   "parts": [
    {
     "t": "prose",
     "text": "Generate and validate one-time passwords (OTP) for two-factor authentication."
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "PyOTP popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "59",
       "of": "/ 100",
       "l": "Gid Score, #1111 overall"
      },
      {
       "n": "11M",
       "l": "downloads a week, pypi"
      },
      {
       "n": "3,348",
       "l": "GitHub stars"
      },
      {
       "n": "8",
       "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 PyOTP is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "PyOTP is a dependency in 8 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 77 projects, and what it is used with below comes from all of them.",
      "The most used alternative in our scan is PyJWT (118 projects).",
      "Projects that use it most often also use Requests (79.2%), cryptography (77.9%), python-dotenv (76.6%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "5 projects, 0.2%",
       "v": "Claude Code",
       "path": "agents/claude-code/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 79.2% of its projects",
       "v": "Requests",
       "path": "tools/requests-py/"
      },
      {
       "l": "In 77.9% of its projects",
       "v": "cryptography",
       "path": "tools/cryptography/"
      },
      {
       "l": "In 76.6% of its projects",
       "v": "python-dotenv",
       "path": "tools/python-dotenv/"
      },
      {
       "l": "In 64.9% of its projects",
       "v": "Pydantic",
       "path": "tools/pydantic/"
      },
      {
       "l": "In 59.7% of its projects",
       "v": "Playwright (Python)",
       "path": "tools/playwright/"
      },
      {
       "l": "In 53.2% of its projects",
       "v": "Beautiful Soup",
       "path": "tools/beautifulsoup4/"
      },
      {
       "l": "In 53.2% of its projects",
       "v": "Uvicorn",
       "path": "tools/uvicorn/"
      },
      {
       "l": "In 51.9% of its projects",
       "v": "aiohttp",
       "path": "tools/aiohttp/"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "usage",
   "h2": "More about PyOTP",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Funding",
       "path": "tools/funding/",
       "items": [
        "GitHub Sponsors: https://github.com/kislyuk"
       ]
      },
      {
       "title": "More in Auth and security libraries",
       "path": "tools/auth-security/",
       "items": [
        {
         "text": "bcryptjs",
         "path": "tools/bcryptjs/"
        },
        {
         "text": "NextAuth.js",
         "path": "tools/next-auth/"
        },
        {
         "text": "jsonwebtoken",
         "path": "tools/jsonwebtoken/"
        },
        {
         "text": "cryptography",
         "path": "tools/cryptography/"
        },
        {
         "text": "jose",
         "path": "tools/jose/"
        },
        {
         "text": "Better Auth",
         "path": "tools/better-auth/"
        },
        {
         "text": "DOMPurify",
         "path": "tools/dompurify/"
        },
        {
         "text": "Helmet",
         "path": "tools/helmet/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "PyOTP",
       "me": true,
       "facts": [
        "MIT",
        "Gid 59",
        "11M/wk"
       ]
      },
      {
       "name": "PyJWT",
       "why": "Python library for encoding and decoding JSON Web Tokens.",
       "path": "tools/pyjwt/",
       "facts": [
        "MIT",
        "Gid 74",
        "176M/wk"
       ]
      },
      {
       "name": "passlib",
       "why": "Comprehensive password hashing framework supporting 30+ algorithms and schemes.",
       "path": "tools/passlib/",
       "facts": [
        "BSD",
        "Gid 64",
        "7.9M/wk"
       ]
      },
      {
       "name": "python-jose",
       "why": "JOSE (JSON Object Signing and Encryption) implementation for Python.",
       "path": "tools/python-jose/",
       "facts": [
        "MIT",
        "Gid 58",
        "7.1M/wk"
       ]
      },
      {
       "name": "bcrypt (Python)",
       "why": "Modern password hashing library with secure bcrypt algorithm implementation.",
       "path": "tools/bcrypt-pypi/",
       "facts": [
        "Apache-2.0",
        "Gid 66",
        "41M/wk"
       ]
      },
      {
       "name": "Authlib",
       "why": "Ultimate Python library for building OAuth and OpenID Connect servers and clients.",
       "path": "tools/authlib/",
       "facts": [
        "BSD",
        "Gid 70",
        "38.2M/wk"
       ]
      },
      {
       "name": "oauthlib",
       "why": "Comprehensive OAuth request-signing implementation for Python, handling authentication flows securely.",
       "path": "tools/oauthlib/",
       "facts": [
        "BSD-3-Clause",
        "Gid 69",
        "62.8M/wk"
       ]
      }
     ],
     "more": "Compare PyOTP with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "install",
     "intro": "Install it.",
     "code": "pip install pyotp"
    },
    {
     "t": "gap",
     "text": "No step-by-step start for PyOTP yet: we have not written its hand-checked card."
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "pypi pyotp"
  ],
  [
   "Category",
   "Auth and security libraries"
  ],
  [
   "License",
   "MIT"
  ],
  [
   "Gid Score",
   "58.9"
  ],
  [
   "Rank in category",
   "#57 of 141"
  ],
  [
   "GitHub",
   "pyauth/pyotp"
  ],
  [
   "Last change",
   "Nov 19, 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/pyauth.png"
}