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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: onepassword-0.1.5.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.1.5.tar.gz
Algorithm Hash digest
SHA256 52a886963b1454c97a241dca251e4694c470434aca800b9dd28110ca7d81903d
MD5 8a08f45270a0ab025b035d86c3bd8550
BLAKE2b-256 890d07d7f763716f8b14e741700f2434931733e892afb4cbda3eeb163d437d4c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: onepassword-0.1.5-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.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f874c16583894fc4cbeb986c1a6f067c4d1682e679fba768c3649e987a9f05cf
MD5 e2674ac1419f115e65f339da220cfdb1
BLAKE2b-256 8e789bc7f9525d80132605b38ee866ca833a8b01891fbb73ede28c79d5173378

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