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

Uploaded Source

Built Distribution

onepassword-0.2.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: onepassword-0.2.1.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.0 CPython/3.8.1 Linux/4.19.99-1-lts

File hashes

Hashes for onepassword-0.2.1.tar.gz
Algorithm Hash digest
SHA256 2475cd59720cf24f5669352e72ac657a5bb30ffdefdef2189ede89620cea00fe
MD5 3cc6d604c4742d77f23a1dbfc64aa6d9
BLAKE2b-256 b4b2247f0755d9dea9957257b1077a019b178c96438d7d864df85e1e155b18b5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for onepassword-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 26c553f35b7adb5169f226a4fa1550d2e5c0622d935eb69c05bbbebe381a9801
MD5 76ced108eb1d83a2c7ebc4d6a1700f36
BLAKE2b-256 3604942566c844335b2bd5ca0c7287e4a6c0f2959b1457797dab9045dedc2920

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