What's New in v0.84.0: Enhancing API Interactions
The latest release, v0.84.0, is here! We've been working hard to improve the Anthropics SDK for Python, and this new version brings exciting changes that'll make your life easier when interacting with our API.
Features Overview
Take a look at what's changed in this release:
-
api: Change array format to brackets -
api: Remove publishing section from CLI target
These two features are closely related and will greatly simplify your API interactions. Let's dive into the details!
Using the New Array Format (Array Brackets)
In previous versions, when fetching arrays of objects from our API, you might have encountered this format:
{
"array": {
"key1": "value1",
"key2": "value2"
}
}
This has been changed to the more intuitive bracket notation:
{
"array": ["key1=value1", "key2=value2"]
}
To take advantage of this change, simply update your code to use the new format. Here's an example:
import requests
url = 'https://example.com/api/endpoint'
response = requests.get(url)
if response.status_code == 200:
array_data = response.json()['array']
for item in array_data:
print(item)
Removing Publishing Section from CLI Target
If you've used our SDK with the anthropic CLI tool, you might have noticed a publishing section in your target configuration. This section is no longer needed and can be safely removed.
Here's an example of what your old target config might look like:
{
"name": "my-target",
"url": "https://example.com/api/endpoint",
"publishing": {
"enabled": true,
"frequency": "daily"
}
}
With the new release, this section can be simplified to:
{
"name": "my-target",
"url": "https://example.com/api/endpoint"
}
Why Developers Should Care
These two changes will make a significant difference in your day-to-day work with our SDK. The new array format is more readable and easier to parse, while removing the publishing section from CLI target simplifies configuration management.
Take advantage of these enhancements by updating to v0.84.0 today!
Key Takeaways
- Update to v0.84.0 for the latest features and improvements
- Use the new bracket notation when fetching arrays from our API
- Remove the
publishingsection from your CLI target configuration - Enjoy simplified API interactions and more readable data formats
Top comments (0)