Skip to content

1.0.0

Choose a tag to compare

@autorelease3 autorelease3 released this 08 Apr 21:57
· 166 commits to develop since this release
1.0.0
3143a3e

💥 Breaks

  • Migration Guide

    • The top level module was renamed from foundry to foundry_sdk to resolve a name collision with the foundry package. This means that all imports will need to be updated. For example, the following import:
    from foundry import FoundryClient

    will need to be updated to:

    from foundry_sdk import FoundryClient
    • The deprecated page operations have been removed in favor of the list operations. If you were still using the page methods, you can switch them to list instead.
    page = client.datasets.Dataset.Branch.page(dataset_rid, page_size=page_size)  # before
    page = client.datasets.Dataset.Branch.list(dataset_rid, page_size=page_size)  # after
    • The method definitions no longer include TypeDict types for complex objects. Instead, only the pydantic BaseModel classes will be included in the method definition. Python dictionaries can continue to be passed into these methods; however, mypy/pyright type checking will start to error if you use dictionaries.
    # before
    class ScheduleClient:
        ...
        
        def create(
            self,
            *,
            action: typing.Union[CreateScheduleRequestAction, CreateScheduleRequestActionDict],
            ...
        ) -> Schedule:
        
    # after
    class ScheduleClient:
        ...
        
        def create(
            self,
            *,
            action: CreateScheduleRequestAction,
            ...
        ) -> Schedule:
    • Typing support has also been removed from the to_dict() methods on the base classes. Support may be added back in the future if there are use cases for having typing support.
    # before
    class Schedule(BaseModel):
        ...
    
        def to_dict(self) -> "ScheduleDict":
            """Return the dictionary representation of the model using the field aliases."""
            return typing.cast(ScheduleDict, self.model_dump(by_alias=True, exclude_none=True))
    
    # after
    class Schedule(BaseModel):
        ...
    
        def to_dict(self) -> Dict[str, Any]:
            """Return the dictionary representation of the model using the field aliases."""
            return self.model_dump(by_alias=True, exclude_none=True)
    • The deprecated sign_in_as_service_user method was removed ConfidentialClientAuth. The get_token method can be used instead.
    • The deprecated page_iterator property from ResourceIterator was removed. Instead, the data and next_page_token properties can be accessed directly from the ResourceIterator class.
    • The deprecated hostname parameter was removed from the UserTokenAuth class and token was made a positional argument. (#180)