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.0.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.0-py3-none-any.whl (25.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bitwarden_wrapper-0.1.0.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.13.14 Linux/7.0.13+deb14-asahi

File hashes

Hashes for bitwarden_wrapper-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4171789deb074ad6d6d80be7ca29d6d1dbfee208b09a0db82483164806836f01
MD5 9744bec2e165eaaae8dc885aee9a6bbe
BLAKE2b-256 f883a433719203f93daa3d12862f71a0df35b849a7c11a815ee13530d0c298ab

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bitwarden_wrapper-0.1.0-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.13.14 Linux/7.0.13+deb14-asahi

File hashes

Hashes for bitwarden_wrapper-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6a20f80b36eb6037dcef3b9e03aacbe5612f21a1cd6b0808b86af43c1757c3b6
MD5 5089d199c40a1513924c6bc20d4189e8
BLAKE2b-256 bac5eceb498aeb8343ecaef96b66391f02531541563998cfb013de29998adedd

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