Skip to content

Refactor: package-wide lazy-loading utility #72

@cagataycali

Description

@cagataycali

Context

PR #56 review — @awsarron noted lazy import patterns are scattered across the package. Suggested a package-wide reusable lazy imports loader.

Problem

Multiple __init__.py files implement ad-hoc __getattr__ for lazy loading. require_optional() in utils.py handles import-or-fail but not deferred loading.

Proposed Solution

Create a reusable lazy-loading utility in strands_robots/utils.py that all __init__.py files can use, reducing boilerplate and ensuring consistency.

Acceptance Criteria

  • Single utility for lazy imports
  • All __getattr__ lazy imports migrated
  • Tests verify lazy behavior

Ref: PR #56 review threads

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions