All notable changes to this project will be documented in this file.
- Create new items via stdin to
op
command rather than reading from temp file (gh-172)
Deprecated support
op
versions < 2.26.0 and >= 2.21.0 (gh-200)
Unsupported
op
versions < 2.21.0 (gh-200)
- Version checking for the
op
CLI tool at run-time (gh-162) opversion
command- Export
OPCLIVersion
as API OPCLIVersionSupportException
class
op
versions < 2.24.0 and >= 2.19.0
- Support for
op
versions < 2.19.0
- Remove
op
version checks for special behaviors where the version is no longer supported (gh-193)
op
config (e.g..config/op/confg
) missing is no longer a failure if 1Password app integration is enabled
- Updated README to correct a broken URL for a github workflow badge
- Updated .pre-commit-config.yaml
isort
version
No release will be generated for this update
- User editing (gh-159)
OP.user_edit()
- Ensured all tests pass under Windows
- Added Vagrant file to aid in automated local development testing on windows
- Added
windows-latest
to OS matrix in github testing workflow
- Document editing (gh-150):
OP.document_edit()
- Describe document editing in
docs/document-editing.md
- Added set of document editing examples under
examples/document_editing
Substantial reorganization of tests/
Raise OPItemEditException
when editing item fields if the item does not exist.
-
Item editing (gh-143):
OP.item_edit_add_password_field()
OP.item_edit_add_url_field()
OP.item_edit_add_text_field()
OP.item_edit_set_password()
OP.item_edit_set_url_field()
OP.item_edit_set_text_field()
OP.item_edit_delete_field()
OP.item_edit_favorite()
OP.item_edit_generate_password()
OP.item_edit_tags()
OP.item_edit_title()
OP.item_edit_url()
-
OPAbstractItem.field_value_by_section_label()
(gh-144)- replacement for poorly named
field_value_by_section_title()
- replacement for poorly named
-
Support for
op
newwhoami
behavior version 2.20.0 (gh-146)- new
whoami
dict - On
OP()
initialization, accomodatewhoami
failure when the token hasn't been used recently
- new
- Added Python 3.12 support (gh-152)
- Removed Python 3.8 support (gh-152)
- Ensure all methods for section lookup by label raise
OPSectionNotFound
if no section is found matching the given label (gh-144) - Ensure all methods for field lookup by label raise
OPFieldNotFound
if no field is found matching the given label (gh-144)
OPAbstractItem.field_value_by_section_title()
(gh-144)- call
OPAbstractItem.field_value_by_section_label()
instead
- call
- Deprecated kwargs to
OP()
: (gh-161)use_existing_session
(replaced byexisting_auth
)account_shorthand
(replaced byaccount
)
- Deprecated exception
OPNotSignedInException
class (gh-161)- replaced with
OPAuthenticationException
- replaced with
- Documented item editing in
docs/item-editing.md
- Added set of item editing examples under
examples/item_editing
- Updated testing configuration in conjuncton with refactored
mock-op
- Add
FUNDING.yml
- Have
setup.py
automatically convert relative URLs inlong_description
to absolute GitHub URLs so they work on PyPI
OP.item_create()
broken due to subcommand args not added to arugment list (gh-136)
- Fixed
scripts/batch_create.py
not setting tags properly - Enable console debug logging in
scripts/batch_create.py
- Account and user UUIDs are now partially masked when logged (gh-130)
- New class, RedactedString, for automatically redacting strings when appropriate (gh-130)
- Properly package up JSON data files under
data/svc_acct_commands
(gh-131) - Change
pytest
behavior undertox
to better detect files not properly packaged (gh-131)
Fix support for removing an account from the op
CLI config (gh-121)
OP.account_forget()
method with support forop account forget
in CLI version >= 2
OP.forget()
- This has been broken since the CLI version 2 refactor in
pyonepassword
version 3.0.0
- This has been broken since the CLI version 2 refactor in
Support for authentication via service accounts: Set OP_SERVICE_ACCOUNT_TOKEN
prior to initializing OP
object. See docs/AUTHENTICATION.md
for more details.
Note: The minimum supported op
command version is 2.18.0-beta.01.
- New exception classes:
OPAuthenticationException
- For any issue with authentication during
OP()
initialization - If authentication has exipired prior to performing an operation
- For any issue with authentication during
OPCLIPanicException
- the rare case the
op
command itself crashes
- the rare case the
OPCmdMalformedSvcAcctTokenException
- in the case that the
op
command is unable to parse a service account token
- in the case that the
OPRevokedSvcAcctTokenException
- The service account token in use has been revoked and is no longer valid
- The exception class
OPNotSignedInException
is now deprecated:- handle
OPAuthenticationException
instead
- handle
- OPServerItem properties corresponding to "hosting provider" fields (gh-115)
- Significant refactor of testing of item types (
tests/test_item_types
) (gh-41)
- Support for database item creation via
OPDatabaseItemTemplate
(gh-111)
- Check if authorization has expired or is otherwise invalid before performing
op
operations (gh-84)- Raise
OPNotSignedInException
rather than the genericOPCmdFailedException
- Raise
- Detect if an
op
command failure was actuallymock-op
failing to find a response definition- This was masking test failures that are expecting simulated command failures
OPDatabaseItem
class for retrieving database 1Password items (gh-98)
Substantial refactor of automated test expected data for item objects
- @Rom3dius: gh-97 pull request
- Ability to delete multiple items at once via
OP.item_delete_multiple()
(gh-82) - Ability to create items with tags applied (gh-83)
tags
property to all items and item descriptors (gh-93)
Support creating item objects from non-conformant item data and unknown item types
Non-conformant item dictionaries returned by op
can now optionally be parsed with relaxed validation (gh-85). See "Added" below.
- An API to relax validation of item dictionaries in the case that
op
returns non-conforming dictionaries. SeeITEM_VALIDATION.md
. - The ability to instantiate item objects and item descriptor lists (e.g., OP.item_get() & OP.item_list()) where an item is an unknown type.
- Where appropriate, a
generic_okay
kwargs has been added, enabling generic item objects to be returned
- Where appropriate, a
Minor update to .pre-commit-config.yaml.
Note: No PyPI release will be generated for this update.
Missed a few housekeeping commits from the development branch
Fixed a shellcheck complaint in a docker testing script
- update .pre-commit-config: bump isort 5.11.3 -> 5.11.4
- refactor
pypi_password.py
script
- Initialize url_obj in
OP.login_item_create()
to not crash if no URL provided (gh-78)
- minor tweaks to docker testing scripts
- OP.item_delete() method (gh-52)
- about & version clas methods:
- OP.about()
- OP.version()
- Include all
pyonepassword
subpackages by wildcard during build/installation (gh-64) - Clean
*.egg-info
during build/installation to ensure proper things get included/excluded
- Updated Renovate bot's
rennovate.json
to targetdevelopment
branch rather thanmain
No release will be generated for this update
- Added
py.typed
marker formypy
type analysis when imported into other projects (gh-48) - Extensive improvements with type-hinting throughout project
- Added
mypy
testing totox.ini
- Add
mypy
testing to Docker infrastructure
- A few bugs found by
mypy
where the wrong type was being passed to or returned from a method - A few cases where the wrong type being passed by a caller would have crashed rather than passed back up as a meaningful error
- Properly export all symbols exposed under
pyonepassword.api
s
- Fix an issue where
op.item_delete()
would blow up if the item to be deleted was an unknown (to pyonepassword) type (gh-54)
Minor updates to ITEM_CREATION.md
New item creation API!
Primarily
- OP.item_create()
- OP.login_item_create()
Additionally, there are a number of new types in support of item creation. See ITEM_CREATION.md for a variety of examples.
Item deletion API:
- OP.item_delete()
- Bug where
op
config having no accounts was not handled properly (#43)
- This CHANGELOG file to hopefully serve as a summary of notable changes
- This release is primarily a refactor of the
OP()
constructor in order to organize authentication steps - This should be mostly transparent to the caller, with the following exceptions:
- New exception class:
pyonepassword.api.OPUnknownAccountException
- New kwargs for
OP()
:existing_auth
andaccount
- New constants for
existing_auth
:EXISTING_AUTH_AVAIL
,EXISTING_AUTH_IGNORE
,EXISTING_AUTH_REQD
- New exception class:
- The following kwargs to
OP()
are deprecated:use_existing_session
: useexisting_auth
insteadaccount_shorthand
: useaccount
instead