{"id":7820,"library":"types-auth0-python","title":"Typing stubs for auth0-python","description":"This is a type stub package for the `auth0-python` library, providing static type annotations that can be used by type checkers like MyPy or Pyright. It helps ensure type safety and improves IDE autocompletion for code interacting with the Auth0 Python SDK. This version of `types-auth0-python` aims to provide accurate annotations for `auth0-python==4.10.*`. It is part of the typeshed project, which releases frequently (often several times a month) to keep up with runtime library changes.","status":"active","version":"4.10.0.20260408","language":"python","source_language":"en","source_url":"https://github.com/python/typeshed","tags":["typing","stubs","auth0","typeshed","type-checking"],"install":[{"cmd":"pip install types-auth0-python","lang":"bash","label":"Install typing stubs"}],"dependencies":[{"reason":"Provides type hints for this runtime library. Not a runtime dependency, but a type-checking dependency.","package":"auth0-python","optional":false}],"imports":[{"wrong":"from auth0.management import ManagementClient","symbol":"ManagementClient","correct":"from auth0-stubs.management import ManagementClient"}],"quickstart":{"code":"import os\nfrom auth0.management import ManagementClient\nfrom auth0.management.users import Users\nfrom typing import Dict, Any\n\n# Ensure environment variables are set for actual use\nAUTH0_DOMAIN: str = os.environ.get('AUTH0_DOMAIN', 'your-tenant.auth0.com')\nAUTH0_CLIENT_ID: str = os.environ.get('AUTH0_CLIENT_ID', 'YOUR_CLIENT_ID')\nAUTH0_CLIENT_SECRET: str = os.environ.get('AUTH0_CLIENT_SECRET', 'YOUR_CLIENT_SECRET')\n\n# Initialize the ManagementClient with client credentials for automatic token management\n# This client is fully type-hinted by types-auth0-python\nmanagement_client: ManagementClient = ManagementClient(\n    domain=AUTH0_DOMAIN,\n    client_id=AUTH0_CLIENT_ID,\n    client_secret=AUTH0_CLIENT_SECRET\n)\n\n# Access a sub-client, e.g., for users management\nusers_client: Users = management_client.users\n\n# Example: List users (response types are Pydantic models in v5, but can be dicts too)\ntry:\n    # Use .all() for pagination convenience or .get_all() if you need more control\n    all_users: list[Dict[str, Any]] = users_client.get_all()\n    print(f\"Found {len(all_users)} users.\")\n    if all_users:\n        print(f\"First user ID: {all_users[0].get('user_id')}\")\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")","lang":"python","description":"This quickstart demonstrates how to initialize the `ManagementClient` from `auth0-python` (version 5.0.0+), which is fully typed by `types-auth0-python`. It fetches the domain, client ID, and client secret from environment variables and then lists all users using the `users` sub-client. The example shows how type hints from `types-auth0-python` would apply to client initialization and method calls, aiding static analysis."},"warnings":[{"fix":"Refer to the `auth0-python` v5 migration guide and update import paths, client instantiation, and how response data is accessed (e.g., use `.model_dump()` to convert Pydantic models to dictionaries if needed).","message":"The `auth0-python` library underwent a major rewrite in v5.0.0, introducing significant breaking changes. This includes changes to import paths (e.g., `from auth0.management import Auth0` is now `from auth0.management import ManagementClient`), client initialization, and response types (now Pydantic models instead of generic dictionaries).","severity":"breaking","affected_versions":"auth0-python < 5.0.0 to 5.0.0+"},{"fix":"Always install `types-auth0-python` with a version compatible with your `auth0-python` installation. Check the `types-auth0-python` PyPI page for the supported `auth0-python` version range. Pin both packages if necessary (e.g., `auth0-python~=4.10.0` and `types-auth0-python==4.10.0.YYYYMMDD`).","message":"Mismatching versions of `types-auth0-python` and `auth0-python` can lead to incorrect type checking or errors. The stub package aims to provide accurate annotations for specific `auth0-python` versions (e.g., `4.10.*`).","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure your Python environment meets the minimum requirement for the `auth0-python` version you are using. Update Python if necessary.","message":"`auth0-python` has increased its minimum Python version requirement. For example, v5 requires Python >=3.9, and v5.2.0 dropped support for Python 3.8. Using older Python versions with newer `auth0-python` (and thus `types-auth0-python`) can cause runtime errors or `SyntaxError` with type hints.","severity":"breaking","affected_versions":"auth0-python < 3.9 / 3.10 / 3.11"}],"env_vars":null,"search_vec":"'4.10':67 'accur':61 'aim':58 'annot':22,62 'auth0':5,16,48,56,65,92 'auth0-python':4,15,64 'autocomplet':42 'chang':89 'check':96 'checker':29 'code':44 'ensur':36 'frequent':77 'help':35 'ide':41 'improv':40 'interact':45 'keep':84 'librari':18,88 'like':30 'month':82 'mypi':31 'often':78 'packag':12 'part':70 'project':74 'provid':19,60 'pyright':33 'python':6,17,49,57,66 'releas':76 'runtim':87 'safeti':38 'sdk':50 'sever':79 'static':20 'stub':2,11,91 'time':80 'type':1,10,21,28,37,55,90,95 'type-check':94 'types-auth0-python':54 'typesh':73,93 'use':26 'version':52","created_at":"2026-04-16T14:14:47.775542+00:00","updated_at":"2026-04-16T14:14:47.775542+00:00","problems":{"verify_error":"File \"<string>\", line 1\n    from auth0-stubs.management import ManagementClient\n              ^\nSyntaxError: invalid syntax"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"4.10.0.20260509","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/typeshed-internal/stub_uploader","docs":null,"changelog":"https://github.com/typeshed-internal/stub_uploader/blob/main/data/changelogs/auth0-python.md","pypi":"https://pypi.org/project/types-auth0-python/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["type-stubs","auth-security"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}