pyonepassword

A python API to query a 1Password account using the 'op' command-line tool

MIT License

Downloads
12.7K
Stars
68
Committers
9

Bot releases are visible (Hide)

pyonepassword - 5.0.1 Latest Release

Published by zcutlip 2 months ago

Fixed

  • Create new items via stdin to op command rather than reading from temp file (gh-172)

op CLI Version Support

Deprecated support

  • op versions < 2.26.0 and >= 2.21.0 (gh-200)

Unsupported

  • op versions < 2.21.0 (gh-200)
pyonepassword - 5.0.0

Published by zcutlip 5 months ago

Added

  • Version checking for the op CLI tool at run-time (gh-162)
  • opversion command
  • Export OPCLIVersion as API
  • OPCLIVersionSupportException class

Deprecated

  • op versions < 2.24.0 and >= 2.19.0

Removed

  • Support for op versions < 2.19.0

Misc

  • Remove op version checks for special behaviors where the version is no longer supported (gh-193)
pyonepassword - 4.3.0

Published by zcutlip 7 months ago

Added

  • op config (e.g. .config/op/confg) missing is no longer a failure if 1Password app integration is enabled (gh-187)
pyonepassword - 4.2.0

Published by zcutlip 10 months ago

Added

  • User editing (gh-159)
    • OP.user_edit()

Testing

  • 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
pyonepassword - 4.1.0

Published by zcutlip 11 months ago

Added

  • Document editing (gh-150):
    • OP.document_edit()

Documentation

  • Describe document editing in docs/document-editing.md
  • Added set of document editing examples under examples/document_editing

Misc

Substantial reorganization of tests/

pyonepassword - 4.0.1

Published by zcutlip 11 months ago

Fixed

Raise OPItemEditException when editing item fields if the item does not exist.

pyonepassword - 4.0.0

Published by zcutlip 12 months ago

Added

  • 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()
  • Support for op new whoami behavior version 2.20.0 (gh-146)

    • new whoami dict
    • On OP() initialization, accomodate whoami failure when the token hasn't been used recently

Changed

  • 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)

Deprecated

  • OPAbstractItem.field_value_by_section_title() (gh-144)
    • call OPAbstractItem.field_value_by_section_label() instead

Removed

  • Deprecated kwargs to OP(): (gh-161)
    • use_existing_session (replaced by existing_auth)
    • account_shorthand (replaced by account)
  • Deprecated exception OPNotSignedInException class (gh-161)
    • replaced with OPAuthenticationException

Documentation

  • Documented item editing in docs/item-editing.md
  • Added set of item editing examples under examples/item_editing

Misc

  • Updated testing configuration in conjuncton with refactored mock-op
  • Add FUNDING.yml
  • Have setup.py automatically convert relative URLs in long_description to absolute GitHub URLs so they work on PyPI
pyonepassword - 4.0.0b3

Published by zcutlip 12 months ago

Installable via pip3 install --upgrde --pre pyonepassword==4.0.0.b3

Added

  • Additional item editing API:
    • OP.item_edit_add_url_field()

Documentation

  • Documented item editing in docs/item-editing.md
pyonepassword - 4.0.0b2

Published by zcutlip almost 1 year ago

Added

  • Additional item editing API:
    • OP.item_edit_add_password_field()
    • OP.item_edit_delete_field()
pyonepassword - 4.0.0b0

Published by zcutlip about 1 year ago

Added

  • Item editing:

    • OP.item_edit_generate_password()
    • OP.item_edit_set_password()
    • OP.item_edit_set_title()
    • OP.item_edit_set_favorite()
    • OP.item_edit_set_tags()
    • OP.item_edit_set_url()
    • OP.item_edit_set_text_field()
    • OP.item_edit_add_text_field()
    • OP.item_edit_set_url_field()
  • OPAbstractItem.field_value_by_section_label() as a replacement for poorly named field_value_by_section_title()

  • Support for op new whoami behvior version 2.20.0

    • new whoami dict
    • On OP() initialization, accomodate whoami failure when the token hasn't been used recently

Changed

  • Removed Python 3.8 support
  • Added Python 3.12 support
  • Ensure all methods for section lookup by label raise OPSectionNotFound if no section is found matching the given label
  • Ensure all methods for field lookup by label rais OPFieldNotFound if no field is found matching the given label

Deprecated

  • OPAbstractItem.field_value_by_section_title()
    • call OPAbstractItem.field_value_by_section_label() instead

Misc

  • Updated testing configuration in conjuncton with refactored mock-op
  • Add FUNDING.yml
pyonepassword - 3.12.1

Published by zcutlip over 1 year ago

Fixed

  • OP.item_create() broken due to subcommand args not added to arugment list (gh-136)

Miscellaneous

  • Fixed scripts/batch_create.py not setting tags properly
  • Enable console debug logging in scripts/batch_create.py
pyonepassword - 3.12.0

Published by zcutlip over 1 year ago

Added

  • Account and user UUIDs are now partially masked when logged (gh-130)
  • New class, RedactedString, for automatically redacting strings when appropriate (gh-130)
pyonepassword - 3.11.1

Published by zcutlip over 1 year ago

Fixed

  • Properly package up JSON data files under data/svc_acct_commands (gh-131)
  • Change pytest behavior under tox to better detect files not properly packaged (gh-131)
pyonepassword - 3.11.0

Published by zcutlip over 1 year ago

Fix support for removing an account from the op CLI config (gh-121)

Added

  • OP.account_forget() method with support for op account forget in CLI version >= 2

Removed

  • OP.forget()
    • This has been broken since the CLI version 2 refactor in pyonepassword version 3.0.0
pyonepassword - 3.10.0

Published by zcutlip over 1 year ago

Added

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
    • OPCLIPanicException
      • the rare case the op command itself crashes
    • OPCmdMalformedSvcAcctTokenException
      • in the case that the op command is unable to parse a service account token
    • OPRevokedSvcAcctTokenException
      • The service account token in use has been revoked and is no longer valid

Deprecated

  • The exception class OPNotSignedInException is now deprecated:
    • handle OPAuthenticationException instead
pyonepassword - 3.9.0

Published by zcutlip over 1 year ago

Added

  • OPServerItem properties corresponding to "hosting provider" fields (gh-115)

Misc

  • Significant refactor of testing of item types (tests/test_item_types) (gh-41)
pyonepassword - 3.8.0

Published by zcutlip over 1 year ago

Added

  • Support for database item creation via OPDatabaseItemTemplate (gh-111)
pyonepassword - 3.7.1

Published by zcutlip over 1 year ago

Fixed

  • Check if authorization has expired or is otherwise invalid before performing op operations (gh-84)
    • Raise OPNotSignedInException rather than the generic OPCmdFailedException
  • Detect if an op command failure was actually mock-op failing to find a response definition
    • This was masking test failures that are expecting simulated command failures
pyonepassword - 3.7.0

Published by zcutlip over 1 year ago

Added

  • OPDatabaseItem class for retrieving database 1Password items (gh-98)

Misc

Substantial refactor of automated test expected data for item objects

Contributors

  • @Rom3dius: gh-97 pull request
pyonepassword - 3.6.0

Published by zcutlip over 1 year ago

Added

  • 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)
Package Rankings
Top 11.47% on Pypi.org
Related Projects