docs: add missing Python snippets to logging guide#512
Open
YuemengZheng wants to merge 1 commit into
Open
Conversation
Fill the four `// TODO: Add python code here` placeholders in the logging cookbook with Python equivalents of the existing TypeScript snippets: the AgentSquad constructor signature, aws-lambda-powertools install command, Logger initialization, and AgentSquad creation with a custom logger. Closes 2FastLabs#439
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue Link (REQUIRED)
Fixes #439
Summary
Changes
The logging cookbook page (
docs/src/content/docs/cookbook/monitoring/logging.mdx) had four Python tabs containing// TODO: Add python code hereplaceholders. This fills all four with Python equivalents of the existing TypeScript snippets:AgentSquad.__init__constructor signature (Python's equivalent of the TS options interface)pip install aws-lambda-powertoolsfrom aws_lambda_powertools import Logger/Logger(service=..., level="INFO")AgentSquad(storage=..., options=AgentSquadConfig(...), logger=logger)Snippets were verified against the Python source: the constructor signature matches
python/src/agent_squad/orchestrator.py, theLOG_*flags matchAgentSquadConfiginpython/src/agent_squad/types/types.py, and import paths are correct.User experience
Before: every Python tab on the logging guide showed a
// TODOplaceholder with no working example. After: each tab shows a correct, copy-pasteable Python snippet mirroring the TypeScript side, restoring the repo's documented TS/Python feature parity.Checklist