{"id":23335,"library":"azurefunctions-extensions-base","title":"Azure Functions Extensions Base","description":"Base Python worker extension for Azure Functions, providing infrastructure for building custom extensions. Current version 1.1.0, requires Python >=3.8. Released as part of the Azure Functions Python programming model.","status":"active","version":"1.1.0","language":"python","source_language":"en","source_url":"https://github.com/Azure/azure-functions-python-extensions-base","tags":["azure","functions","serverless","extensions","python"],"install":[{"cmd":"pip install azurefunctions-extensions-base","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Required for Azure Functions runtime integration.","package":"azure.functions","optional":false}],"imports":[{"note":"BaseExtension is in the 'base' submodule, not at the package root.","wrong":"from azurefunctions.extensions import BaseExtension","symbol":"BaseExtension","correct":"from azurefunctions.extensions.base import BaseExtension"},{"note":"ExtensionRegistry is also in the 'base' submodule.","wrong":"from azurefunctions.extensions import ExtensionRegistry","symbol":"ExtensionRegistry","correct":"from azurefunctions.extensions.base import ExtensionRegistry"}],"quickstart":{"code":"from azurefunctions.extensions.base import BaseExtension, ExtensionRegistry\n\n# Initialize registry\nregistry = ExtensionRegistry()\n\n# Define a custom extension\nclass MyExtension(BaseExtension):\n    def __init__(self):\n        super().__init__()\n\n# Register extension\nextension = MyExtension()\nregistry.add_extension(extension)\n\nprint('Extension registered successfully.')","lang":"python","description":"Initialize an ExtensionRegistry, define a custom extension by subclassing BaseExtension, and register it."},"warnings":[{"fix":"Migrate to the Azure Functions Python programming model V2 (azure.functions v1.18+).","message":"The V1 programming model (using function.json) is deprecated in favor of the V2 model (using decorators). This extension base is designed for the V2 model.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Always import from 'azurefunctions.extensions.base'.","message":"Importing from 'azurefunctions.extensions' directly without the 'base' submodule will fail. The package structure is not flat.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use the new 'ExtensionRegistry.add_extension' method. Refer to the official changelog.","message":"Version 1.0.0 changed the extension registration API. Previously, extensions were registered via a different method.","severity":"breaking","affected_versions":"1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install azurefunctions-extensions-base azure-functions'.","cause":"Missing or incorrect installation of the Azure Functions SDK or extensions package.","error":"ModuleNotFoundError: No module named 'azurefunctions'"},{"fix":"Use 'from azurefunctions.extensions.base import BaseExtension'.","cause":"Incorrect import path; BaseExtension is in the 'base' submodule.","error":"ImportError: cannot import name 'BaseExtension' from 'azurefunctions.extensions'"},{"fix":"Update to the latest version: 'pip install --upgrade azurefunctions-extensions-base'.","cause":"The package may be outdated or not installed correctly.","error":"AttributeError: module 'azurefunctions.extensions' has no attribute 'base'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}