Releases: palantir/foundry-platform-python
Releases · palantir/foundry-platform-python
1.3.0
No documented user-facing changes
1.2.0
No documented user-facing changes
1.1.0
No documented user-facing changes
1.0.0
💥 Breaks
-
Migration Guide
- The top level module was renamed from
foundrytofoundry_sdkto resolve a name collision with thefoundrypackage. 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
pageoperations have been removed in favor of thelistoperations. If you were still using thepagemethods, you can switch them tolistinstead.
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
TypeDicttypes for complex objects. Instead, only the pydanticBaseModelclasses 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_usermethod was removedConfidentialClientAuth. Theget_tokenmethod can be used instead. - The deprecated
page_iteratorproperty fromResourceIteratorwas removed. Instead, thedataandnext_page_tokenproperties can be accessed directly from theResourceIteratorclass. - The deprecated
hostnameparameter was removed from theUserTokenAuthclass andtokenwas made a positional argument. (#180)
- The top level module was renamed from
0.118.0
No documented user-facing changes
0.117.0
No documented user-facing changes
0.116.0
No documented user-facing changes
0.115.0
0.114.0
💡 Improvements
-
Swap
datetimetypes withAwareDatetimetypes frompydanticto ensure timezones are used when constructing adatetimeinstance. (#181) -
Promote the latest
FoundryClientfrom the top level package so that users can import everything they need to get started from thefoundrypackage.from foundry import UserTokenAuth, FoundryClient client = FoundryClient(hostname="...", auth=UserTokenAuth(...)) ``` ([#182](https://github.com/palantir/foundry-platform-python/pull/182))