Skip to main content

Unofficial tool for stateless Bitwarden vault management

Project description

Unofficial Python API for Bitwarden Vault Management

Overview

vaultio is an unofficial Python API for managing Bitwarden vaults via the Bitwarden CLI. Instead of launching a new CLI process for each operation, it runs the CLI once in the background and communicates with it through a private socket connection. This improves performance and provides a secure method for using the serve API to build tools and scripts.

How It Works

The API is built around the stateful Express web server launched by the bw serve command. This server exposes a local REST API for performing vault actions. vaultio wraps this API internally and delegates all actions to the Bitwarden CLI.

Note: vaultio does not cache or store credentials. All requests are proxied directly to the background process.


Installation

📦 Pip

pip install vaultio

🔧 Repo

cd python
python -m venv .venv
source .venv/bin/activate
pip install poetry
poetry install

Installing the Bitwarden CLI

Option 1: Official CLI

By default, bw serve exposes its API via HTTP over TCP, which can be less secure since other users or apps might access the unlocked vault without proper firewall rules.

You can either:

  • Ensure bw is available in your PATH, or
  • Run:
vaultio build

This installs the CLI from the official NPM package @bitwarden/cli.

Option 2: Unofficial Fork with Socket Support

I made a pull request that introduces support for Unix sockets and other socket types in bw serve. This allows communication without traversing the network stack, improving security.

To enable this:

$HOME/.cache/vaultio/bin/bw
  • Or, let vaultio handle it for you:
vaultio --unofficial

This will clone the repo and build it locally. Then it will show you a diff against the official repo before prompting you to continue.


Usage

📘 API Documentation

See the full API reference.

📟 CLI Wrapper

vaultio --help

🧪 Example: Check Status and List Items

from vaultio.vault import Vault

with Vault() as vault:
    print(vault.status())
    print(vault.unlock())
    print(vault.status())

    for item in vault.list():
        print(item["name"])

    for folder in vault.list(type="folder"):
        print(folder["name"])

🔍 More Examples


🔐 HTTPS Support

Not currently supported directly, but it's possible using Caddy.

Related

  • PyWarden is a Python Bitwarden CLI wrapper

Disclaimer

This project is not associated with https://bitwarden.com/ or Bitwarden, Inc. These contributions are independent of Bitwarden and are reviewed by other maintainers.

Please note: We cannot be held liable for any data loss that may occur while using vaultio. This includes passwords, attachments, and other information handled by the application. We highly recommend performing regular backups of your files and database. However, should you experience data loss, we encourage you to contact us immediately.

Project details


Download files

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

Source Distribution

vaultio-0.1.4.102.tar.gz (30.8 kB view details)

Uploaded Source

Built Distribution

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

vaultio-0.1.4.102-py3-none-any.whl (39.9 kB view details)

Uploaded Python 3

File details

Details for the file vaultio-0.1.4.102.tar.gz.

File metadata

  • Download URL: vaultio-0.1.4.102.tar.gz
  • Upload date:
  • Size: 30.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.1 Linux/6.12.9-200.fc41.x86_64

File hashes

Hashes for vaultio-0.1.4.102.tar.gz
Algorithm Hash digest
SHA256 b2fe3b38a2c7f0d3b83614a510ac171d0cc289cb6094bab623d8e5562a0ce795
MD5 d80fa8e0d2d6c893cf60d76aca88c345
BLAKE2b-256 b9fc00cee2645fa87f47ce9fef9869d58a204f824050a8e6b3dd9d17cfde8ef3

See more details on using hashes here.

File details

Details for the file vaultio-0.1.4.102-py3-none-any.whl.

File metadata

  • Download URL: vaultio-0.1.4.102-py3-none-any.whl
  • Upload date:
  • Size: 39.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.1 Linux/6.12.9-200.fc41.x86_64

File hashes

Hashes for vaultio-0.1.4.102-py3-none-any.whl
Algorithm Hash digest
SHA256 f19e6a3cc7ef00f57aaa646e498622ee00e17f0f5f7971b0c897f7a5843f4228
MD5 50624de1f01fa2726d03c0955e1df39d
BLAKE2b-256 a8b528f8ec9f7a1dda1e0058360111af429e98e78646e2756dcd09479826222b

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 Pingdom Monitoring Sentry Error logging StatusPage Status page