Releases: 1Password/onepassword-sdk-python
Releases · 1Password/onepassword-sdk-python
Release 0.3.1
1Password Python SDK v0.3.1
NEW
VaultOverview
now includescreated_at
andupdated_at
fields that show when the vault was created and last updated.
Release 0.3.0
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
orArchived
.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
tolist
. 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]
toList[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
toList
. 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]
toList[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.
Release 0.2.1
1Password Python SDK v0.2.1
NEW
CreatedAt
andUpdatedAt
item metadata: Items and item overviews now expose attributes with their creation and last edit times.- Resolving secrets in bulk: With the
client.secrets.resolveAll
function, the SDK is now able to resolve multiple secrets at once, improving the performance of the operation.
IMPROVED
- Support for new field types: Items with
Address
andDate
fields can now be created, retrieved, and edited using the 1Password SDK. - Item sharing for attachments and documents: Items with files attached can now be shared.
- Adding custom fields in sections automatically: If a custom field has no specified section, the SDKs now automatically add the custom field to an empty section within the item, creating it if necessary.
Tags
in item overviews: The return type ofitems.list_all
now also contains the item tags.- Broader item editing capabilities: You can now use the items.put function with more item types, including those with fields that are not directly editable through the SDK, like legacy fields, or passkeys.
FIXED
- Improvements to resolving secret references:
- Archived items are no longer used for secret references.
- When multiple sections match a section query when resolving secret references, the SDKs now look through the fields in all matching sections instead of erroring.
Release 0.2.0
1Password Python SDK v0.2.0
NEW
- File Support: You can now create Document items, attach files to items, delete files from items, and read file contents using the SDK.
IMPROVED
- Read files using secret references: You can now resolve secret references that point to files attached to 1Password items.
- Read SSH keys in Open SSH format: You can now use a secret reference to fetch a private key in OpenSSH format. For example:
op://vault/<SSH item>/private key?ssh-format=openssh
- Support for more item field types: You can now create, retrieve, and edit items containing SSH keys, Month-Year and Menu-type fields using the SDK.
- Read more field types using secret references: You can now resolve secret references that point to information stored in Date, Month/Year, Address, and Reference field types.
- Improved error messages: The error messages returned by the SDK were improved to be more clear and actionable.
Release 0.1.7
1Password Python SDK v0.1.7
IMPROVED:
- The SDK now returns an error with a custom type when it hits the rate limit of the 1Password servers.
FIXED:
- Using an SDK client in a long-running process no longer causes 401 server responses.
Release 0.1.6
NEW
- Support for item sharing: You can now create an item sharing link via the 1Password SDKs using the new
client.items.shares
API. - Support for item archiving: You can now move items to the archive with the SDKs, using the new
client.items.archive(vault_uuid, item_uuid)
function.
IMPROVED
- Support for item notes: You can now read, create and edit items with a notes field, accessing it via
item.notes
. - Support for SSH key attributes in secret references: You can now retrieve an SSH key's public key, key type and fingerprint with
client.secrets.resolve
. - Support for additional field types: You can now read, create and edit items with Email (email addresses) and Reference (ID references to other 1Password items) type fields.
- Type hinting: When developing with the Python SDK, the functions now show type hints on their parameters and return types.
FIXED
- Improved field matching logic for secret references: Retrieving a field from the item's default field section is now possible even if there is an identically named field in one of the item's named sections.
Release 0.1.5
Version 0.1.5 of the 1Password Python SDK brings:
- Support for generating passwords. You can now generate random, PIN, and memorable passwords using the
onepassword.Secrets.generate_password
function. - Support for item subtitles. Creating and editing an item now sets the subtitle correctly, which is visible in the item preview in all client apps.
- Support for the Credit Card Number field type. You can now retrieve, create, and edit items containing credit card numbers.
Release 0.1.4
The v0.1.4 release of the Python SDK brings:
- Support for validating secret references. You can now check that a secret reference is formatted correctly without having to resolve it or even authenticate, using the 'ValidateSecretReference' function.
Release 0.1.3
The v0.1.3 release of the Python SDK brings:
- Support for item websites. You can now create, get, and edit websites within your 1Password items using item CRUD functions.
Release 0.1.2
The v0.1.2 release of the Python SDK brings:
- Support for item tags. You can now create, get, and edit tags within your 1Password items using item CRUD functions.
- Support for fetching one-time password codes using secret references. You can now fetch your TOTP code with the
secrets.resolve
function, using a secret reference for the TOTP field in your item. For example:op://vault/item/field?=attribute=totp
- PyPI wheels for the Python SDK. You can now install the Python SDK via
pip install onepassword-sdk
- Full support for optional values. You no longer have to manually set
details: None
orsection: None
when instantiatingItemCreateParams
. - Item creation now only requires specifying the vault ID, item category, and item title.