Skip to main content

Vault

Pypi Build Status codecov MIT licensed

Vault is a simple Python password manager. It allows you to securely save secrets with a simple CLI interface.

Features

  • Secrets are stored in an encrypted SQLite database with SQLCipher
  • Within the database, each password and notes are encrypted with a unique salt using AES-256 encryption with pycryptodome
  • Master key is hashed with a unique salt
  • Possibility to create an unlimited number of vaults
  • Clipboard cleared automatically
  • Automatic vault locking after inactivity
  • Password suggestions with password-generator-py
  • Import / Export in Json

Basic usage

Demo

Installation and setup

Vault is tested on Python 3.11 to 3.15. SQLCipher is bundled with the sqlcipher3 package on macOS, Linux and Windows, so you do not need to install it separately.

pip3 install pyvault

# Run setup
vault

On Linux, copying secrets to the clipboard requires xclip (or xsel):

sudo apt install -y xclip

Upgrading from 2.4.5 or earlier

Earlier versions used the SQLCipher library installed on your system. Vault now uses the bundled SQLCipher 4, which opens any vault created with SQLCipher 4.x (the version shipped by Homebrew and by Ubuntu 20.04 and later). If your vault was created with SQLCipher 3.x, export it with your current version before upgrading and import it again afterwards (see import):

vault --export vault_backup.json        # before upgrading
pip3 install -U pyvault
vault --import_items vault_backup.json  # after upgrading, then delete vault_backup.json

If no prebuilt package exists for your platform, pip builds sqlcipher3 from source. You then need the SQLCipher headers (brew install sqlcipher on macOS, sudo apt install -y gcc python3-dev libsqlcipher-dev on Ubuntu/Debian).

Using Docker

# Pull the image
docker pull gabfl/vault

# Create local directory
mkdir ~/.vault

# Launch image
docker run -v ~/.vault:/root/.vault -ti gabfl/vault

Cloning the project

# Clone project
git clone https://github.com/gabfl/vault && cd vault

# Installation
pip3 install .

# Run setup
vault

Advanced settings:

usage: vault [-h] [-t [CLIPBOARD_TTL]] [-p [HIDE_SECRET_TTL]]
             [-a [AUTO_LOCK_TTL]] [-v VAULT_LOCATION] [-c CONFIG_LOCATION]
             [-k] [-i IMPORT_ITEMS] [-x EXPORT] [-f [{json}]] [-e]

optional arguments:
  -h, --help            show this help message and exit
  -t [CLIPBOARD_TTL], --clipboard_TTL [CLIPBOARD_TTL]
                        Set clipboard TTL (in seconds, default: 15)
  -p [HIDE_SECRET_TTL], --hide_secret_TTL [HIDE_SECRET_TTL]
                        Set delay before hiding a printed password (in
                        seconds, default: 15)
  -a [AUTO_LOCK_TTL], --auto_lock_TTL [AUTO_LOCK_TTL]
                        Set auto lock TTL (in seconds, default: 900)
  -v VAULT_LOCATION, --vault_location VAULT_LOCATION
                        Set vault path
  -c CONFIG_LOCATION, --config_location CONFIG_LOCATION
                        Set config path
  -k, --change_key      Change master key
  -i IMPORT_ITEMS, --import_items IMPORT_ITEMS
                        File to import credentials from
  -x EXPORT, --export EXPORT
                        File to export credentials to
  -f [{json}], --file_format [{json}]
                        Import/export file format (default: 'json')
  -e, --erase_vault     Erase the vault and config file

Metadata

Release files for pyvault 2.4.6

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

Source distribution (sdist)

Source distribution for pyvault 2.4.6
File Size Uploaded Provenance Actions
pyvault-2.4.6.tar.gz 22.8 kB Without provenance Details for pyvault-2.4.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyvault 2.4.6
File Interpreter ABI Platform Actions
pyvault-2.4.6-py3-none-any.whl Python 3 none any Details for pyvault-2.4.6-py3-none-any.whl

Total release size: 52.0 kB

Release files / pyvault-2.4.6.tar.gz

Download URL pyvault-2.4.6.tar.gz
Size 22.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d4ced3cdb2bc59fea9ef49591f8f75b3bce707414f3e03a794105cba8f1de136
BLAKE2b-256 checksum
How to use checksums
2427a21975f47c2237f48489162d0df9b8356c86afbf8dac4d7da68bf5af9476
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

Release files / pyvault-2.4.6-py3-none-any.whl

Download URL pyvault-2.4.6-py3-none-any.whl
Size 29.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a8f8fe3175548c2f3afe48edab5ce92bb6ffb4a0f272d9b1e6db58cf7afb7aa2
BLAKE2b-256 checksum
How to use checksums
820d6203ebeaabc60acb490e663551e65377f1b53d2f3ae31553c0c1b93b7f1b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

Security for pyvault 2.4.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.4.6 This release

2 release files No provenance

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