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

Uploaded Python 3

File details

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

File metadata

  • Download URL: bitwarden_wrapper-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 22e7295dab9ab62070092173bfd276c095829a99fdf3fb53e19e51a67c60224c
MD5 643eaef93c9bb8db86d838af2f0fad2c
BLAKE2b-256 396258ef096f5898429c98404eb9db69b003d628aa6ba620fc604cab9c4ec65c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bitwarden_wrapper-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fa130adf90ba81e26d49c04b280a291e765334c3b2375f95a5137b518968dcef
MD5 14bd75b18ed7b74e467df3524e5341b2
BLAKE2b-256 29318e263e03e7e08d3554f06f4343b9a7fe3f5b7fa90dbd2027bec6da6a9252

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