Skip to content

Release 0.3.0

Compare
Choose a tag to compare
@MOmarMiraj MOmarMiraj released this 23 Apr 14:48
· 8 commits to main since this release
v0.3.0
a77fcf2

1Password Python SDK v0.3.0

NEW

  • Support for item states: You can now fetch an item's state using the SDK. ItemOverview exposes one of two states: Active or Archived.
    • Active: An item located inside a vault. (Default)
    • Archived: An item that has been moved to the Archive. 1Password doesn't include archived items in search results or suggest them when you fill in apps and browsers. You can keep archived items as long as you'd like.
  • Filtering listed items by state: You can now filter the results of the item list function by item state.

FIXED

  • Deleting Archived Items: The SDK now supports deleting items from the archive.

⚠️ BREAKING CHANGES ⚠️

This release contains breaking changes for two functions in the Python SDK.

Vault listing

  • The function name has changed from list_all to list. To use this in your code, replace:
vaults = await client.vaults.list_all(vault_id)

with:

vaults = await client.vaults.list(vault_id)
  • The return type of the vault listing function has changed from SDKIterator[VaultOverview] to List[VaultOverview]. To use this in your code, replace:
async for vault in vaults:
    # using vault overview

with:

for vault in vaults:
    # using vault overview

Item listing

  • The function name has changed from ListAll to List. To use this in your code, replace:
overviews = await client.items.list_all(vault_id)

with:

overviews = await client.items.list(vault_id, ItemListFilter(
                content=ItemListFilterByStateInner(
                    active=True,
                    archived=True,
                )
            ))
  • The return type of the item listing function has changed from SDKIterator[ItemOverview] to List[ItemOverview]. To use this in your code, replace:
async for overview in overviews:
    # using item overview

with:

for overview in overviews:
    # using item overview

This does not affect any code that's already deployed, and will not take effect in your codebase until you choose to update to version 0.3.0 or later of the 1Password Python SDK.