Skip to content

Latest commit

 

History

History
80 lines (54 loc) · 7.04 KB

File metadata and controls

80 lines (54 loc) · 7.04 KB
graph LR
    User_Facing_API["User-Facing API"]
    Prompt_Core_Engine["Prompt Core & Engine"]
    Specific_Prompt_Implementations["Specific Prompt Implementations"]
    Utility_Layer["Utility Layer"]
    User_Facing_API -- "invokes" --> Prompt_Core_Engine
    Prompt_Core_Engine -- "returns result to" --> User_Facing_API
    Prompt_Core_Engine -- "delegates to" --> Specific_Prompt_Implementations
    Specific_Prompt_Implementations -- "utilizes common logic from" --> Prompt_Core_Engine
    User_Facing_API -- "uses helpers from" --> Utility_Layer
    Prompt_Core_Engine -- "uses helpers from" --> Utility_Layer
    Specific_Prompt_Implementations -- "uses helpers from" --> Utility_Layer
Loading

CodeBoardingDemoContact

Details

The questionary library employs a clear component-based architecture, centralizing user interaction through a User-Facing API that abstracts the complexities of terminal prompting. This API dispatches requests to the Prompt Core & Engine, which acts as the central control unit, orchestrating the prompt's lifecycle and integrating with prompt_toolkit. The core engine then delegates to specialized Specific Prompt Implementations, each responsible for the unique rendering and input handling of a particular prompt type (e.g., text, select, checkbox). A shared Utility Layer provides common helper functions and integrations, supporting all components. This design ensures modularity, allowing for easy extension with new prompt types while maintaining a consistent and robust interaction flow.

User-Facing API

The public interface for questionary, providing high-level functions to initiate prompts and forms, handling initial setup and basic error management.

Related Classes/Methods:

Prompt Core & Engine

The central orchestrator managing the prompt lifecycle, integrating with prompt_toolkit, and providing reusable building blocks and common logic for all prompt types.

Related Classes/Methods:

Specific Prompt Implementations

Individual modules, each dedicated to a specific interactive prompt type, defining unique rendering, input processing, and validation rules.

Related Classes/Methods:

Utility Layer

Contains general-purpose helper functions and utilities used across the library for various tasks.

Related Classes/Methods: