Skip to content

feat: allow customizing the handler DI data key - #12

Merged
mamahoos merged 1 commit into
mainfrom
feature/custom-di-data-key
Aug 8, 2026
Merged

feat: allow customizing the handler DI data key#12
mamahoos merged 1 commit into
mainfrom
feature/custom-di-data-key

Conversation

@mamahoos

@mamahoos mamahoos commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add `setup_input(..., data_key=...)` (default remains `"input"`)
  • Export `DEFAULT_DATA_KEY`
  • Tests for custom key and empty-key rejection

Closes #11

Test plan

  • `uv run pytest`
  • CI green

Avoid collisions when handlers already depend on a name like `input`.
Fixes #11.
@mamahoos
mamahoos merged commit b1659b9 into main Aug 8, 2026
@mamahoos
mamahoos deleted the feature/custom-di-data-key branch August 8, 2026 09:16

@mamahoos mamahoos left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Long live the king.

from .waiter import InputWaiter

HANDLER_DATA_KEY = "input"
DEFAULT_DATA_KEY = "input"

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical name change

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

must have a key validitaion

@mamahoos mamahoos mentioned this pull request Aug 8, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow customizing the handler DI data key

1 participant