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.1.tar.gz
(3.8 kB
view details)
Built Distribution
File details
Details for the file onepassword-0.4.1.tar.gz
.
File metadata
- Download URL: onepassword-0.4.1.tar.gz
- Upload date:
- Size: 3.8 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 | ebd932ba62703671260a57743277520fc66a06971ff2e3f59e4296c7ff0c34f7 |
|
MD5 | 85dc540d92de2d0b235fae2f221ed796 |
|
BLAKE2b-256 | 57e66b18570df436e46fd4c89689bad8f30fe0f91deb1be448f9ada284e18749 |
File details
Details for the file onepassword-0.4.1-py3-none-any.whl
.
File metadata
- Download URL: onepassword-0.4.1-py3-none-any.whl
- Upload date:
- Size: 3.9 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 | b4b5401fbeac6a97f429304a6776b852f79d636028e764f042dd2c3140a1a03e |
|
MD5 | 1ec743f646cff9249a1ccbdd52c2e681 |
|
BLAKE2b-256 | c6561f259b2041e4919d6999e1e7d4b6e209c8b47e8cfc0bccc7e71ef8328196 |