Skip to main content
https://img.shields.io/pypi/v/ta_bitwarden_cli.svg https://img.shields.io/travis/macejiko/ta_bitwarden_cli.svg Documentation Status

Thoughtful Automation BitWarden CLI installation package


Installation

For correct work please use python virtualenv approach! Also use –no-cache-dir option. Otherwise it would cache package wheel and wont download bw CLI binary anymore

python3 -m virtualenv venv
source venv/bin/activate
pip install --no-cache-dir ta-bitwarden-cli

Code above will additionally install bw CLI binary to a first available folder in the $PATH


Example Usage

import os
from ta_bitwarden_cli import ta_bitwarden_cli as ta

bitwarden_credentials = {
    "password": os.getenv("BW_PASSWORD"),
    "client_id": os.getenv("BW_CLIENTID"),
    "client_secret": os.getenv("BW_CLIENTSECRET"),
}
creds = {
    "my_vault_item": "Google Maps API Key",
}
bw = ta.Bitwarden(bitwarden_credentials)
assert bw.get_credentials(creds)["my_vault_item"]["password"] == "XXXXXXX"

Troubleshooting

If you use Windows during code execution you could face with something like:

FileNotFoundError: [WinError 2] The system cannot find the file specified

This means that no binary is available. In that case please manually download BitWarden CLI binary from https://vault.bitwarden.com/download/?app=cli&platform=windows and put it to any folder from $PATH. This approach is similar to chromedriver


Development

1. Prepare local dev env

python3 -m virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
pre-commit install

2. Test

BW_PASSWORD=YYY BW_CLIENTID=XXX BW_CLIENTSECRET=ZZZ pytest

3. Commit your code using https://www.conventionalcommits.org/en/v1.0.0/ style commit messages

4. Submit PR

Metadata

Release files for ta-bitwarden-cli 0.14.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ta-bitwarden-cli 0.14.0
File Size Uploaded
ta_bitwarden_cli-0.14.0.tar.gz 95.2 MB Details

Release files / ta_bitwarden_cli-0.14.0.tar.gz

Download URL ta_bitwarden_cli-0.14.0.tar.gz
Size 95.2 MB
Tags Source
SHA-256 checksum
How to use checksums
0f82b2c93efe481112e48da80dfb00e79890ff727ef6e9aab38b43655a50ef2a
BLAKE2b-256 checksum
How to use checksums
e04958aaf37da479fa49f15a87b4d0fa6f464fc4ee2c357ee1cb2703bd75859a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.0

Release history Release notifications | RSS feed

This release

0.14.0 This release

1 release file

0.13.0

1 release file

0.12.0

1 release file

0.11.0

1 release file

0.10.0

1 release file

0.9.3

1 release file

0.8.2

1 release file

0.8.1

1 release file

0.8.0

1 release file

0.7.10

1 release file

0.7.9

1 release file

0.7.8

1 release file

0.7.6

1 release file

0.7.5

1 release file

0.7.4

1 release file

0.7.3

1 release file

0.7.2

1 release file

0.7.1

1 release file

0.7.0

1 release file

0.6.4

1 release file

0.6.3

1 release file

0.6.2

1 release file

0.6.1

1 release file

0.6.0

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.0

1 release file

0.3.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page