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

Uploaded Source

Built Distribution

onepassword-0.2.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: onepassword-0.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 9340ea1944216a7aea2e2f313218090afaa8901842456b5bce1fd98c9d0caa2b
MD5 0e6d2316e797b60f8362b2d30bd8562d
BLAKE2b-256 03d28f7fa2a321be357c57f7008ca3da098efe667ca66a9ac03cd9e30e7a8628

See more details on using hashes here.

File details

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

File metadata

  • Download URL: onepassword-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 3.4 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6f18f76df8b6f836782640591d8854e318d298c65a0b3fba6fe6deb94d9e10b0
MD5 7e4136f347a69bd9bddd5c8478dfa7f2
BLAKE2b-256 7c865b3b902dedfe25371e5c5fecccf14faab237abf1f8c0244b22bd6834c2ac

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