Skip to main content

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


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.3.2.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

onepassword-0.3.2-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file onepassword-0.3.2.tar.gz.

File metadata

  • Download URL: onepassword-0.3.2.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.8.1 Linux/5.4.23-1-lts

File hashes

Hashes for onepassword-0.3.2.tar.gz
Algorithm Hash digest
SHA256 5c061872aafdad556d5f3c41c8b7b55a8f83b4b162ed193fc98deacd4d96aa5d
MD5 577f4400cbbb8ff270f35bc1c693125d
BLAKE2b-256 3ee8925cb88d61726cbcbb7cebf37dd3bf9c869b955e1d7127288bec84a849ff

See more details on using hashes here.

File details

Details for the file onepassword-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: onepassword-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.8.1 Linux/5.4.23-1-lts

File hashes

Hashes for onepassword-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c475710d9fbd8c7fa5307343daeb0104bc3754d9791630e5a1155cebc210d6c2
MD5 1066efa77c9c94227e75dedf2977ead0
BLAKE2b-256 92aa084fc5660a479cf1e2a7a7da30a5453fe3af71202c8f5c94a04c2bbded24

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page