Released:
A python API to query a 1Password account using the 'op' command-line tool
Then you pick out a random letter eg letters3 will return 'd' since the list is 0-based and Python treats strings as sequences of characters. Using shuffle like you are already doing, you can write more concise code. Improve this answer. Follow answered Sep 10 '20 at 20:31. Python One-Liners will teach you how to read and write “one-liners”: concise statements of useful functionality packed into a single line of code. You’ll learn how to systematically unpack and understand any line of Python code, and write eloquent, powerfully compressed Python. 1Password Connect Python SDK. The 1Password Connect SDK provides access to the 1Password via 1Password Connect hosted on your infrastructure. The library is intended to be used by Python applications to simplify accessing items in 1Password vaults.
Project description
Description
A Python API to sign into and query a 1Password account using the op
command.
Requirements
- Python >= 3.7
- 1Password command-line tool
- see 1Password command-line tool: Getting started
- Internet connectivity to 1Password.com
- The
op
command queries your online account, not your local vault
- The
Installation
Example usage
Note: It is recommended to perform initial sign-in manually on the command line before using pyonepassword
. Initial sign-in is supported but deprecated. Multi-factor-authenticaiton is not supported.
Subsequent sign-in and item retrieval
Below is an example demonstrating:
- Subsequent sign-in
- Specifying a default vault for queries
- Retrieving an item from 1Password by name or by UUID
- Overriding the default vault to retrieve a subsequent item from 1Password
Document retrieval
Below is an example demonstrating:
- Retrieving a document and its file name from 1Password, based on item name
- Retrieving a document & file name from 1Password, based on UUID
Signing out of 1Password
Below is an example demonstrating:
- Signing in, then signing out of 1Password
- Signing out and also forgetting a 1Password account
Note: Currently pyonepassword
's sign-out & forget support requires a signed-in session. It is not yet possible to forget an arbitrary account.
Getting Details for a User
Getting Details for a Group
Getting Details for a Vault
Notes
- This has been lightly tested, and only on my Mac. I don't know if it works on other systems.
- This has been tested with
op
version 1.7.0 - You need the
op
1Password command-line tool. On a Mac with homebrew, you can dobrew install 1password-cli
.
Python Password File
TODO
- Ability for forget arbitrary accounts, not just the one currently signed in
- API mapping on to all of
op
's various commands and subcommands - API to get complete or partial JSON for an item
- Unit testing
Release historyRelease notifications | RSS feed
1.8.3
1.8.2
1.8.1
1.8.0
1.7.1
1.7.0
1.1.0
0.9.1
0.9
0.1.0b3 pre-release
0.1.0b2 pre-release
0.1.0b1 pre-release
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size pyonepassword-1.8.3-py3-none-any.whl (15.9 kB) | File type Wheel | Python version py3 | Upload date | Hashes |
Filename, size pyonepassword-1.8.3.tar.gz (14.6 kB) | File type Source | Python version None | Upload date | Hashes |
Hashes for pyonepassword-1.8.3-py3-none-any.whl
Algorithm | Hash digest |
---|---|
SHA256 | 6757536f54d510ef465557fd8241a5db1c2b1dfca19cc0a16d00266e17b40a72 |
MD5 | 06532929f4864f8429e827964f807c82 |
BLAKE2-256 | 626dd7a856b0a14657fc5b41d9691ae27f21879bf177b515f21c710112b927e0 |
Python Password Maker
ClosePython 1password Example
Hashes for pyonepassword-1.8.3.tar.gz
Python Password Box
Algorithm | Hash digest |
---|---|
SHA256 | 575dfb79a1f69b8eaac97e595514d7a1226e0e93075f4a305f5c5ac11f99c3b3 |
MD5 | 9ed11259a549c42e4ca480c6cf01734a |
BLAKE2-256 | 6e1dacb89d5851eb14d008beae2ece0c21fd078c1807d01353e715a44ff2ed04 |