Python wrapper for the 1password CLI
Project description
onepassword-python
Python wrapper for the 1password CLI
Usage
from onepassword import OnePassword
secret = {"password": "<YOUR-PASSWORD-HERE>",
"username": "<YOUR-USERNAME-HERE>",
"signin_address": "<YOUR-1PASSWORD-ORGNIZATION-ADDRESS>",
"secret_key": "<YOUR-1PASSWORD-SECRET-KEY>"}
op = OnePassword(secret=secret)
documents = op.list("documents")
pem_keys = (doc for doc in documents if doc["overview"]["title"].endswith("pem"))
first_key = next(pem_keys)
key_contents = op.get("document", first_key["uuid"])
print(key_contents)
API
onepassword.OnePassword
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
onepassword-0.4.0.tar.gz
(3.7 kB
view details)
Built Distribution
File details
Details for the file onepassword-0.4.0.tar.gz
.
File metadata
- Download URL: onepassword-0.4.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.9 CPython/3.8.3 Linux/5.4.48-1-lts
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ad2172d0273592b528699ed94c8f83e0a1ac19c0e730f2dcb2e75002717b58b |
|
MD5 | a23616b71375caf36484963f8d46c510 |
|
BLAKE2b-256 | 54a76790d00ac07125de235cac8c4d224d4e152a14f1b97d72fc8a1434c13764 |
File details
Details for the file onepassword-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: onepassword-0.4.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.9 CPython/3.8.3 Linux/5.4.48-1-lts
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec8a25ba7b691d80ecd43be7aaf97e3fe32f8d198a16d77ae126c2ab6ad9f106 |
|
MD5 | 589045f5b7dd35f05d89b52b8f4b0267 |
|
BLAKE2b-256 | fbfe5ddc66225a35d0234fa91d7ddd373385d6dddb1b8e4dd22da4783596560a |