Skip to main content

bitwarden-wrapper

PyPI - Version

An extremely simple Bitwarden CLI wrapper. Originally developed for smol-k8s-lab, but extracted so it can be used elsewhere.

Usage

Here's the basic usage:

# initialize the object
bw = BwCLI(my_passsword, my_client_id, my_client_secret)

# unlock the vault
bw.unlock()

# generate a random password
random_password = bw.generate()
# create a login item in the vault
bw.create_login(name="test mctest",
                item_url="coolhosting4dogs.tech",
                user="admin",
                password=random_password)

# lock the vault
bw.lock()

If you pass in tui=True to the BwCLI object, we'll also display a TUI for when a duplicate item exists to allow the user to select what they'd like to do.

You can also specify duplicate_strategy="edit" to edit existing items. The values for duplicate_strategy can be: "edit", "ask", "duplicate", "no_action", but it always defaults to "ask".

Warnings

  1. If you set your logging library to log level DEBUG, we may print sensitive info when creating and deleting vault items. This is intensional for debugging purposes only.

  2. The TUI may throw issues when run inside an event loop. In which case, wecan always fall back to using rich instead.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bitwarden_wrapper-0.1.2.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bitwarden_wrapper-0.1.2-py3-none-any.whl (25.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bitwarden_wrapper-0.1.2.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.11.2 Linux/6.1.0-51-amd64

File hashes

Hashes for bitwarden_wrapper-0.1.2.tar.gz
Algorithm Hash digest
SHA256 361431d4f2f520e26ebfaa328b253287bd0dad5941976da1381aeb66e6ae5f18
MD5 6183f40889035690e7da64c23250428e
BLAKE2b-256 6b2c133fd57f2efd24d8cbf0d82d63ac55452865aa042f77980bf6af1ea4f357

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bitwarden_wrapper-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 25.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.11.2 Linux/6.1.0-51-amd64

File hashes

Hashes for bitwarden_wrapper-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 764b1b186afd8b2f22479fe755bb301d53a0fb7c5eaf0504dd240b9c0b35a73e
MD5 f082e1dabc5b36ffaedfb544eaa95a6c
BLAKE2b-256 66a2f750e66197fe4e3b28fe9b1837c4d04807f6e64ac8cca753a2e9156976dc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page