Prompt example extracted from Anthropic Prompt Library.
TypeScript
C#
Go
Java
PHP
Ruby
client
=
anthropic.Anthropic()
message
=
client.messages.create(
model
=
"claude-opus-5"
,
max_tokens
=
1024
,
system
=
"You are a helpful coding assistant specializing in Python."
,
messages
=
[
{
"role"
:
"user"
,
"content"
:
"How do I sort a list of dictionaries by key?"
}
],
)
print
(message.content)