You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Endpoint such as searches allow providing a parameters called fields which is an enum of fields which the response ends up returning e.g href, id, name, type, division, serverDisplayName, notes
The string must not contain any spaces. Just alphanumerics, underscores, commas, and dots.
This would mean we would have to make all fields in our Response objects optional.
We should also validate that the input is in fact an acceptable response field name.
The text was updated successfully, but these errors were encountered:
pydantic has official support for this as of v2.10.
Rather than make the values optional, we should consider moving up to v2.10 and use the partial validation feature
devraj
changed the title
Support retrieving partial responses from endpoints
Support retrieving partial responses from endpoints (refactor for pydantic 2.10)
Oct 31, 2024
Using yield and async callbacks in Python serve different purposes, and the choice depends on the behavior you need:
Callback Approach: Suitable for simple async tasks where you want to pass a result to a specific function once the task completes, as shown in the previous example.
Using yield with Generators: Useful when you want to produce a series of results over time, especially when processing a large dataset or streaming data. In async scenarios, yield can be used in asynchronous generators with async for, which is ideal for processing multiple chunks of data as they become available.
Endpoint such as searches allow providing a parameters called
fields
which is anenum
of fields which the response ends up returning e.ghref, id, name, type, division, serverDisplayName, notes
This would mean we would have to make all fields in our
Response
objects optional.We should also validate that the input is in fact an acceptable response field name.
The text was updated successfully, but these errors were encountered: