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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for onepassword-0.3.0.tar.gz
Algorithm Hash digest
SHA256 9f4835405da0a27f240ab5fb15eb64bb7756825650719ab89f865d0be813c6aa
MD5 83fc81055c1631a6c6a48d05df67f33a
BLAKE2b-256 842e958cba64aa45465f18891d22d326f854dbcadb1b4ffc007f6a3154ce7c60

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for onepassword-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1cd8af4e3333e3eaee735fb33df225dbc941e2f04f30b70185a3c4e8e04c3b30
MD5 19543ff588a0b9eeab83151946a8f312
BLAKE2b-256 80294372b9a0f1d6ad2685e7bec39c6126dd3ff199ccad18a8a1ce6b5aacca8e

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