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

Uploaded Source

Built Distribution

onepassword-0.1.2-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: onepassword-0.1.2.tar.gz
  • Upload date:
  • Size: 3.1 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.2.tar.gz
Algorithm Hash digest
SHA256 0ee88e766c1383e905ae7e06de0b1d369bc3a6a9b93e315eaae82484a78ccc86
MD5 ba07deaa3bb1753c5980a15a5f6ac130
BLAKE2b-256 dc8b472c6dd190988fa1dd054dc4c329070ffda04fbd8b2c548fc09cbf80c345

See more details on using hashes here.

File details

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

File metadata

  • Download URL: onepassword-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f18a584fc2b020441159af225a74004e25f2c39d9c7bac89ede3a7709d661349
MD5 007c28a79ec138b0a1fbd9732c7755b6
BLAKE2b-256 0a6b034e31f57af8aa7b45537a4f2c12b84a33bd8d6719fb6ec3f21451ecd2d1

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