Skip to content

Commit

Permalink
Merge pull request #192 from zcutlip/dev/162-minimum-version-op-cli
Browse files Browse the repository at this point in the history
issue #162 minimum version op cli
  • Loading branch information
zcutlip committed May 18, 2024
2 parents 89190eb + f44f887 commit 289fb4b
Show file tree
Hide file tree
Showing 35 changed files with 2,009 additions and 196 deletions.
2 changes: 2 additions & 0 deletions .test.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
MOCK_OP_SIGNIN_USES_BIO=1
MOCK_OP_SESS_VAR=OP_SESSION_5GHHPJK5HZC5BAT7WDUXW57G44
MOCK_OP_SESS_TOKEN="mock_session_token_123"
# override CLI version regardless what is in response directory
MOCK_OP_CLI_VER="2.27.0"
# this service account token is well-formed, but deactivated
# it is not sensitive
PYTEST_SVC_ACCT_TOKEN=ops_eyJzaWduSW5BZGRyZXNzIjoiemFjaC1hbmQtbGVhbm5lLjFwYXNzd29yZC5jb20iLCJ1c2VyQXV0aCI6eyJtZXRob2QiOiJTUlBnLTQwOTYiLCJhbGciOiJQQkVTMmctSFMyNTYiLCJpdGVyYXRpb25zIjo2NTAwMDAsInNhbHQiOiJlYUZRQmNVemJyTHhnM2d4bHFQLVVBIn0sImVtYWlsIjoiMm9iNGRpeDdiNTdrYUAxcGFzc3dvcmRzZXJ2aWNlYWNjb3VudHMuY29tIiwic3JwWCI6ImVmZDY4YjNhZTkwMmRjZjRiMzEzYjE5MjYwZmY0OGUzMjU2ZDlhOGNkM2JmMmY3YzI2YzU1ZWJkNjZlZGU4NWEiLCJtdWsiOnsiYWxnIjoiQTI1NkdDTSIsImV4dCI6dHJ1ZSwiayI6IlMwaGE0SDhqbEhRblJCWmxvYnBmR1BneERmbS1pRGNkZWY0bFdYU0VSbmMiLCJrZXlfb3BzIjpbImRlY3J5cHQiLCJlbmNyeXB0Il0sImt0eSI6Im9jdCIsImtpZCI6Im1wIn0sInNlY3JldEtleSI6IkEzLUdHOUVRNi1LUzQ0QVctQU5QVkYtUkdQTDktQlNKUTMtR1NHR0giLCJ0aHJvdHRsZVNlY3JldCI6eyJzZWVkIjoiN2I0OTMxMmJiOTlkZTFiNjU5ODZkYzIzOWU4YWNmZWMxMTU0M2E2OGQxYmYwMjZmZTgzMjg3NWYxNmJlOWY2NiIsInV1aWQiOiJDV1RHQ0hMNlNWRkdSTlg0SzNENUJVSDZDSSJ9LCJkZXZpY2VVdWlkIjoiMnFld3JpaGtqbmt1Zmh6ZGdmZ2hnNmM1cGUifQ
42 changes: 25 additions & 17 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [

{
"name": "Python: Current File",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true
},
{
"name": "sanitize.py",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "scripts/sanitize.py",
"console": "integratedTerminal",
Expand All @@ -25,43 +26,43 @@
},
{
"name": "versions.py",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "examples/versions.py",
"console": "integratedTerminal",
"justMyCode": false
},
{
"name": "debug op forget",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "ipython_snippets/debug.py",
"console": "integratedTerminal"
},
{
"name": "load from json",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "ipython_snippets/load_json_item.py",
"console": "integratedTerminal",
"justMyCode": false
},
{
"name": "new server",
"type": "python",
"type": "debugpy",
"request": "launch",
"module": "examples.server"
},
{
"name": "create_item",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "examples/create_item.py",
"console": "integratedTerminal"
},
{
"name": "server ssh keys",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "examples/server-ssh-keys.py",
"console": "integratedTerminal",
Expand All @@ -76,7 +77,7 @@
},
{
"name": "mock op",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/mop.py",
"console": "integratedTerminal",
Expand All @@ -90,60 +91,67 @@
},
{
"name": "Python: example signin, get item",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "examples/example-signin-get-item.py",
"console": "integratedTerminal"
},
{
"name": "Python: example signin, get document",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "examples/example-signin-get-document.py",
"console": "integratedTerminal"
},
{
"name": "Python: example signin, signout",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "examples/example-signin-signout.py",
"console": "integratedTerminal"
},
{
"name": "example-signin-get-vault",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "examples/example-signin-get-vault.py",
"console": "integratedTerminal"
},
{
"name": "example list items",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "examples/list-items.py",
"console": "integratedTerminal"
},
{
"name": "create items",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "examples/create-item.py",
"console": "integratedTerminal"
},
{
"name": "item edit field type",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "examples/debug_item_edit_field_type.py",
"console": "integratedTerminal"
},
{
"name": "example-service-account",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "examples/example-service-account.py",
"envFile": "${workspaceFolder}/debug_env/svc_acct_env",
"console": "integratedTerminal"
},
{
"name": "OP.whoami",
"type": "debugpy",
"request": "launch",
"program": "ipython_snippets/debug_harness.py",
"console": "integratedTerminal"
},
]
}
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# required during setup.py to check README.md is up to date
include _*template.md
include scripts/update_readme.py
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ A Python API to sign into and query a 1Password account using the `op` command.
## Requirements

- Python >= 3.9
- 1Password command-line tool >= 2.0.0
- see [1Password Developer Documentation](https://developer.1password.com/docs/cli)
- 1Password command-line tool >= 2.24.0
- Versions >= 2.19.0, < 2.24.0 supported but deprecated
- Versions < 2.19.0 are unsupported and an exception will be raised
- See [1Password Developer Documentation](https://developer.1password.com/docs/cli)
- Internet connectivity to 1Password.com
- The `op` command queries your online account, not your local vault

> Note: This version of `pyonepassword` does not support deprecated `op` 1.x versions. Support for those versions is still available, albeit with minimal maintanence. See [pyonepassword-legacy](https://github.com/zcutlip/pyonepassword-legacy) for more information.
> Notes:
> - Generally `pyonepassword` will support up to 5 patch versions, including the current. E.g., 2.{24-28}.0. Five additional patch versions, e.g., 2.{19-23}.0, will be considered deprecated.
> - This version of `pyonepassword` does not support deprecated `op` 1.x versions. Support for those versions is still available, albeit with minimal maintanence. See [pyonepassword-legacy](https://github.com/zcutlip/pyonepassword-legacy) for more information.
## Installation

Expand Down

0 comments on commit 289fb4b

Please sign in to comment.