Skip to content

docs: clarify from field accessed as from_ in Python SDK#107

Open
shuklaji28 wants to merge 1 commit into
agentmail-to:mainfrom
shuklaji28:fix/docs-from-field-python-keyword
Open

docs: clarify from field accessed as from_ in Python SDK#107
shuklaji28 wants to merge 1 commit into
agentmail-to:mainfrom
shuklaji28:fix/docs-from-field-python-keyword

Conversation

@shuklaji28
Copy link
Copy Markdown

@shuklaji28 shuklaji28 commented Mar 17, 2026

Updated 'from' field to include type and documentation for Python SDK usage.The from field in MessageItem and Message types is a reserved keyword in Python. Added documentation notes to clarify that Python SDK users must access this field as from_ (e.g. message.from_). The alias="from" in the SDK handles JSON serialization correctly, but this was not documented.


Summary by cubic

Clarified Python SDK usage of the from field: access it as from_ (e.g., message.from_) because from is a Python keyword. Updated the Message and MessageItem schemas in fern/definition/messages.yml with type and docs; JSON still serializes as from.

Written for commit 7f1630b. Summary will update on new commits.

Updated 'from' field to include type and documentation for Python SDK usage.The `from` field in MessageItem and Message types is a reserved keyword in Python. Added documentation notes to clarify that Python SDK users must access this field as `from_` (e.g. `message.from_`). The alias="from" in the SDK handles JSON serialization correctly, but this was not documented.
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 1 file

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="fern/definition/messages.yml">

<violation number="1" location="fern/definition/messages.yml:119">
P1: Malformed indentation in `Message.properties` breaks YAML/Fern structure and moves `reply_to` out of the `Message` schema.</violation>
</file>

Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Add one-off context when rerunning by tagging @cubic-dev-ai with guidance or docs links (including llms.txt)
  • Ask questions if you need clarification on any suggestion

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

from:
type: MessageFrom
docs: Address of sender. Note - since `from` is a reserved keyword in Python, access this field as `from_` when using the Python SDK (e.g. `message.from_`).
reply_to:
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot Mar 17, 2026

Choose a reason for hiding this comment

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

P1: Malformed indentation in Message.properties breaks YAML/Fern structure and moves reply_to out of the Message schema.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At fern/definition/messages.yml, line 119:

<comment>Malformed indentation in `Message.properties` breaks YAML/Fern structure and moves `reply_to` out of the `Message` schema.</comment>

<file context>
@@ -111,8 +113,10 @@ types:
+      from:
+              type: MessageFrom
+        docs: Address of sender. Note - since `from` is a reserved keyword in Python, access this field as `from_` when using the Python SDK (e.g. `message.from_`).
+reply_to:
         type: optional<list<string>>
         docs: Reply-to addresses. In format `username@domain.com` or `Display Name <username@domain.com>`.
</file context>
Fix with Cubic

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.

1 participant