graph LR
flask_ask_core_session["flask_ask.core:session"]
flask_ask_core_context["flask_ask.core:context"]
flask_ask_core_request["flask_ask.core:request"]
flask_ask_core__flask_view_func["flask_ask.core._flask_view_func"]
flask_ask_core__get_user["flask_ask.core._get_user"]
flask_ask_core__from_context["flask_ask.core._from_context"]
flask_ask_core__from_directive["flask_ask.core._from_directive"]
flask_ask_core__map_params_to_view_args["flask_ask.core._map_params_to_view_args"]
flask_ask_core__flask_view_func -- "Accesses" --> flask_ask_core_context
flask_ask_core__flask_view_func -- "Parses" --> flask_ask_core_request
flask_ask_core__flask_view_func -- "Manages State" --> flask_ask_core_session
flask_ask_core__get_user -- "Queries" --> flask_ask_core_context
flask_ask_core__from_context -- "Extracts Data From" --> flask_ask_core_context
flask_ask_core__from_directive -- "Inspects" --> flask_ask_core_request
flask_ask_core__from_directive -- "Manages User-Specific Directives With" --> flask_ask_core__get_user
flask_ask_core__map_params_to_view_args -- "Extracts Parameters From" --> flask_ask_core_request
The flask_ask.core subsystem forms the backbone of Alexa skill integration with Flask. It centers around the _flask_view_func which orchestrates the processing of incoming Alexa requests. This function interacts with core components: request for raw payload access, session for conversational state management, and context for environmental and user-specific details. Auxiliary components like _get_user and _from_context provide granular access to context data, while _from_directive handles advanced device instructions, often requiring user context. The _map_params_to_view_args component ensures seamless data flow from the Alexa request to the Flask application's view functions. This structured interaction enables robust and context-aware Alexa skill development.
Manages and provides an abstracted interface for accessing and manipulating Alexa session attributes. This is critical for maintaining conversational state across multiple turns in an Alexa skill, allowing the application to store and retrieve user-specific data throughout a session.
Related Classes/Methods:
Offers an abstracted interface to the Alexa request context. This includes details about the device, user (e.g., user ID, permissions), application, and other system-level information provided by the Alexa service. It allows the skill to adapt its behavior based on the environment and user.
Related Classes/Methods:
Encapsulates the raw incoming Alexa request payload. It provides structured access to the request type (e.g., LaunchRequest, IntentRequest), intent name, slot values, and other direct data from the Alexa service. This component is the primary entry point for parsing the user's utterance and intent.
Related Classes/Methods:
Acts as the central request processor within the Flask-Ask framework, orchestrating the request handling lifecycle. It is responsible for integrating the Alexa request data (request, session, context) with Flask's view function mechanism.
Related Classes/Methods:
A utility component specifically designed to extract user-specific information from the Alexa request context, such as the user ID or access tokens.
Related Classes/Methods:
A utility component responsible for extracting general data and attributes from the Alexa request context object, providing structured access to various context-related details.
Related Classes/Methods:
A component used to inspect the Alexa request for directives, which are instructions for the Alexa device (e.g., to play audio, display cards). It helps in processing advanced Alexa features, particularly those involving user-specific states like audio stream management, by utilizing user context.
Related Classes/Methods:
This component is responsible for extracting parameters (like slot values from an intent) from the Alexa request and mapping them appropriately to arguments expected by the Flask view functions, facilitating seamless integration.
Related Classes/Methods: