================
ta-bitwarden-cli
================
.. image:: https://img.shields.io/pypi/v/ta_bitwarden_cli.svg
:target: https://pypi.python.org/pypi/ta_bitwarden_cli
.. image:: https://img.shields.io/travis/macejiko/ta_bitwarden_cli.svg
:target: https://travis-ci.com/macejiko/ta_bitwarden_cli
.. image:: https://readthedocs.org/projects/ta-bitwarden-cli/badge/?version=latest
:target: https://ta-bitwarden-cli.readthedocs.io/en/latest/?version=latest
:alt: 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
-------------
.. code:: python
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**
Raw data
{
"_id": null,
"home_page": "https://www.thoughtful.ai/",
"name": "ta-bitwarden-cli",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "ta_bitwarden_cli",
"author": "Bohdan Sukhov",
"author_email": "bohdan.sukhov@thoughtfulautomation.com",
"download_url": "https://files.pythonhosted.org/packages/08/7c/b1dde87dde96d3af37c2cf22fa55ca865ec0111cfdc0adff25125ee8fd7d/ta_bitwarden_cli-0.12.0.tar.gz",
"platform": null,
"description": "================\nta-bitwarden-cli\n================\n\n\n.. image:: https://img.shields.io/pypi/v/ta_bitwarden_cli.svg\n :target: https://pypi.python.org/pypi/ta_bitwarden_cli\n\n.. image:: https://img.shields.io/travis/macejiko/ta_bitwarden_cli.svg\n :target: https://travis-ci.com/macejiko/ta_bitwarden_cli\n\n.. image:: https://readthedocs.org/projects/ta-bitwarden-cli/badge/?version=latest\n :target: https://ta-bitwarden-cli.readthedocs.io/en/latest/?version=latest\n :alt: Documentation Status\n\n|\n\nThoughtful Automation BitWarden CLI installation package\n\n|\n\nInstallation\n------------\n\nFor correct work please use python virtualenv approach!\nAlso use *--no-cache-dir* option.\nOtherwise it would cache package wheel and wont download **bw** CLI binary anymore\n\n::\n\n python3 -m virtualenv venv\n source venv/bin/activate\n pip install --no-cache-dir ta-bitwarden-cli\n\nCode above will additionally install **bw** CLI binary to a first available folder in the $PATH\n\n|\n\nExample Usage\n-------------\n\n.. code:: python\n\n import os\n from ta_bitwarden_cli import ta_bitwarden_cli as ta\n\n bitwarden_credentials = {\n \"password\": os.getenv(\"BW_PASSWORD\"),\n \"client_id\": os.getenv(\"BW_CLIENTID\"),\n \"client_secret\": os.getenv(\"BW_CLIENTSECRET\"),\n }\n creds = {\n \"my_vault_item\": \"Google Maps API Key\",\n }\n bw = ta.Bitwarden(bitwarden_credentials)\n assert bw.get_credentials(creds)[\"my_vault_item\"][\"password\"] == \"XXXXXXX\"\n\n|\n\nTroubleshooting\n---------------\n\nIf you use Windows during code execution you could face with something like:\n\n::\n\n FileNotFoundError: [WinError 2] The system cannot find the file specified\n\nThis 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\nand put it to any folder from $PATH. This approach is similar to chromedriver\n\n|\n\nDevelopment\n-----------\n\n**1. Prepare local dev env**\n\n::\n\n python3 -m virtualenv venv\n source venv/bin/activate\n pip install -r requirements.txt\n pre-commit install\n\n**2. Test**\n\n::\n\n BW_PASSWORD=YYY BW_CLIENTID=XXX BW_CLIENTSECRET=ZZZ pytest\n\n**3. Commit your code using https://www.conventionalcommits.org/en/v1.0.0/ style commit messages**\n\n**4. Submit PR**\n\n",
"bugtrack_url": null,
"license": "",
"summary": "Thoughtful BitWarden CLI Package",
"version": "0.12.0",
"project_urls": {
"Homepage": "https://www.thoughtful.ai/"
},
"split_keywords": [
"ta_bitwarden_cli"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "087cb1dde87dde96d3af37c2cf22fa55ca865ec0111cfdc0adff25125ee8fd7d",
"md5": "d95a60120648fbce88ee31fe881d6cbd",
"sha256": "7acbe20a784427e85c6b45c4fc0baba4ae2158ea90c6b9ca6e2f9c97d5a8332c"
},
"downloads": -1,
"filename": "ta_bitwarden_cli-0.12.0.tar.gz",
"has_sig": false,
"md5_digest": "d95a60120648fbce88ee31fe881d6cbd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 95175856,
"upload_time": "2024-02-14T14:16:13",
"upload_time_iso_8601": "2024-02-14T14:16:13.471768Z",
"url": "https://files.pythonhosted.org/packages/08/7c/b1dde87dde96d3af37c2cf22fa55ca865ec0111cfdc0adff25125ee8fd7d/ta_bitwarden_cli-0.12.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-14 14:16:13",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "ta-bitwarden-cli"
}