Vault for storing locally encrypted data in S3 using KMS keys
Project description
nitor-vault
Python Vault CLI and library implementation using the Rust vault exposed as a Python extension module.
Encrypt data using client-side encryption with AWS KMS keys.
See the repo root readme for more general information.
Vault CLI
Encrypted AWS key-value storage utility
Usage: vault [OPTIONS] [COMMAND]
Commands:
all, -a, --all List available secrets [aliases: a, list, ls]
completion, --completion Generate shell completions
delete, -d, --delete Delete an existing key from the store [aliases: d]
describe, --describe Print CloudFormation stack parameters for current configuration
decrypt, -y, --decrypt Directly decrypt given value [aliases: y]
encrypt, -e, --encrypt Directly encrypt given value [aliases: e]
exists, --exists Check if a key exists
info, --info Print vault information
id Print AWS user account information
stack Commands for cloudformation stack
init, -i, --init Initialize a new KMS key and S3 bucket. [aliases: i]
lookup, -l, --lookup Output secret value for given key [aliases: l]
store, -s, --store Store a new key-value pair. [aliases: s]
update, -u, --update Update the vault CloudFormation stack. [aliases: u]
help Print this message or the help of the given subcommand(s)
Options:
-b, --bucket <BUCKET> Override the bucket name [env: VAULT_BUCKET=]
-k, --key-arn <ARN> Override the KMS key ARN [env: VAULT_KEY=]
-p, --prefix <PREFIX> Optional prefix for key name [env: VAULT_PREFIX=]
-r, --region <REGION> Specify AWS region for the bucket [env: AWS_REGION=]
--vaultstack <NAME> Specify CloudFormation stack name to use [env: VAULT_STACK=]
--id <ID> Specify AWS IAM access key ID
--secret <SECRET> Specify AWS IAM secret access key
--profile <PROFILE> Specify AWS profile name to use [env: AWS_PROFILE=]
-q, --quiet Suppress additional output and error messages
-h, --help Print help (see more with '--help')
-V, --version Print version
Install
From PyPI
Use pipx or uv to install the Python vault package from PyPI globally in an isolated environment.
pipx install nitor-vault
# or
uv tool install nitor-vault
The command vault should now be available in path.
From source
Build and install locally from source code using pip. This requires a Rust toolchain to be able to build the Rust library. From the repo root:
cd python-pyo3
pip install .
# or with uv
uv pip install .
Check the command is found in path. If you ran the install command inside a virtual env, it will only be installed inside the venv, and will not be available in path globally.
which -a vault
Vault library
This Python package can also be used as a Python library to interact with the Vault directly from Python code.
Add the nitor-vault package to your project dependencies,
or install directly with pip.
Example usage:
from n_vault import Vault
if not Vault().exists("key"):
Vault().store("key", "value")
keys = Vault().list_all()
value = Vault().lookup("key")
if Vault().exists("key"):
Vault().delete("key")
# specify vault parameters
vault = Vault(vault_stack="stack-name", profile="aws-credentials-name")
value = vault.lookup("key")
Development
Uses:
- PyO3 for creating a native Python module from Rust code.
- Maturin for building and packaging the Python module from Rust.
Workflow
You can use uv or the traditional Python and pip combo.
First, create a virtual env:
# uv
uv sync --all-extras
# pip
python3 -m venv .venv
source .venv/bin/activate
pip install '.[dev]'
After making changes to Rust code, build and install module:
# uv
uv run maturin develop
# venv
maturin develop
Run Python CLI:
# uv
uv run python/n_vault/cli.py -h
# venv
python3 python/n_vault/cli.py -h
Install and run vault inside virtual env:
# uv
uv pip install .
uv run vault -h
# venv
pip install .
vault -h
Code Formatting and Linting
This project uses Ruff for code formatting and linting.
Format code, apply lint fixes, and re-format:
uv run ruff format . && uv run ruff check --fix . && uv run ruff format .
Or run the commands separately:
# Format code
uv run ruff format .
# Run linter and apply auto-fixes
uv run ruff check --fix .
Type Checking
This project uses ty for type checking.
Run type checker:
uv run ty check
Updating dependencies
Update all Python dependencies to latest versions:
uv lock --upgrade
uv sync
To update a specific package:
uv lock --upgrade-package <package-name>
uv sync
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nitor_vault-2.8.0.tar.gz.
File metadata
- Download URL: nitor_vault-2.8.0.tar.gz
- Upload date:
- Size: 70.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a24b0d6d04b58bd168e91fc658997a0f8378aea3caae14e21210f2c810da567e
|
|
| MD5 |
07420f7997cc18f8840e3d7e2bed5c97
|
|
| BLAKE2b-256 |
e6b150c0e0f1228e35b2642789479004aed2c3c48e50d32e561e380f777c8a28
|
File details
Details for the file nitor_vault-2.8.0-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: nitor_vault-2.8.0-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 8.5 MB
- Tags: PyPy, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6852f13464ee73a502b30b8c92a2c5d770fcdd90115b5da4c996bc3491f3d624
|
|
| MD5 |
88d6189b5d3c4372de829ddbb3d2cae8
|
|
| BLAKE2b-256 |
50a2e2c0e7806979dfd31b48fd7c4faf98b11500c3df707acd305ecc540cf733
|
File details
Details for the file nitor_vault-2.8.0-pp311-pypy311_pp73-manylinux_2_34_aarch64.whl.
File metadata
- Download URL: nitor_vault-2.8.0-pp311-pypy311_pp73-manylinux_2_34_aarch64.whl
- Upload date:
- Size: 7.9 MB
- Tags: PyPy, manylinux: glibc 2.34+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
898c9655e8ddefcf2674a0a304c6747c9840e32a3d3fb0b226c1ff1de6aa1e65
|
|
| MD5 |
d52b9e4612db899b9e5914b0d45f94dd
|
|
| BLAKE2b-256 |
2334f79b9b555c52dd3e202ddb93a414c84890c4374bdb5c85b4e271cc5e46e3
|
File details
Details for the file nitor_vault-2.8.0-cp314-cp314t-win_amd64.whl.
File metadata
- Download URL: nitor_vault-2.8.0-cp314-cp314t-win_amd64.whl
- Upload date:
- Size: 7.6 MB
- Tags: CPython 3.14t, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5a8080da91deab95078f1030e64195987f57f727c7de1349f00039cb8a4d93a
|
|
| MD5 |
95896ce7d18f429aec15cce35d19812e
|
|
| BLAKE2b-256 |
85275fe37a8ce749cdbb944368d3ed6d7eaa6a418f1fab808a29b4d164bcc23b
|
File details
Details for the file nitor_vault-2.8.0-cp314-cp314t-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: nitor_vault-2.8.0-cp314-cp314t-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 8.4 MB
- Tags: CPython 3.14t, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9207b49041a7d69c7949afbd705b613bac186af1be309d77ec7b7914375b2351
|
|
| MD5 |
d49785f85f5f57619a16b46c3bb04d8f
|
|
| BLAKE2b-256 |
b50e9a90b4468c3a86d68974f2a7f26cc2ac970af6ad9686e4363984758cb728
|
File details
Details for the file nitor_vault-2.8.0-cp314-cp314t-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: nitor_vault-2.8.0-cp314-cp314t-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 8.0 MB
- Tags: CPython 3.14t, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c501b677a2d07576551304902421a75ab955d24885257860b7fb2c75d8b2e06
|
|
| MD5 |
c679471717a3d6c092ac74845368c1da
|
|
| BLAKE2b-256 |
e259bd3b87af5508d2fdb3aacca193be2c3d179d39025a92c5bb29ff000c12ea
|
File details
Details for the file nitor_vault-2.8.0-cp314-cp314t-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: nitor_vault-2.8.0-cp314-cp314t-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 8.5 MB
- Tags: CPython 3.14t, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
879d75bdc4882ae15597a857abd8e9c17ec0d6706a06192ba2bcc60a13adacb8
|
|
| MD5 |
12ae45dbca869119438267a2b8ab8bdf
|
|
| BLAKE2b-256 |
e4be33b50db3731db2de3c0282e7c5accb45313b8680c0524bdfb5f131c26c28
|
File details
Details for the file nitor_vault-2.8.0-cp314-cp314t-manylinux_2_34_aarch64.whl.
File metadata
- Download URL: nitor_vault-2.8.0-cp314-cp314t-manylinux_2_34_aarch64.whl
- Upload date:
- Size: 7.9 MB
- Tags: CPython 3.14t, manylinux: glibc 2.34+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c934932e0d1348074b22d63c32d5d0757b345851c275ec56df25948675a2941
|
|
| MD5 |
ba6c90ca29c02e82cf3d1e542d4a84ac
|
|
| BLAKE2b-256 |
ce7c6d91c89b34df3b36b2590b5c81bcdc48a28fc6e1c4304763e8256e16c1db
|
File details
Details for the file nitor_vault-2.8.0-cp314-cp314t-macosx_11_0_arm64.whl.
File metadata
- Download URL: nitor_vault-2.8.0-cp314-cp314t-macosx_11_0_arm64.whl
- Upload date:
- Size: 6.9 MB
- Tags: CPython 3.14t, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
299133916d2ee0183f06f8601eb8b6c8526e25273826cd70f1a9fa07fb3c91bb
|
|
| MD5 |
7308b1527df9a024d18bd5a6a583b50e
|
|
| BLAKE2b-256 |
36668fb5fd2944372f2b06a49c339d5406ab14d5c72afbe1d02491a430ccc1aa
|
File details
Details for the file nitor_vault-2.8.0-cp314-cp314t-macosx_10_12_x86_64.whl.
File metadata
- Download URL: nitor_vault-2.8.0-cp314-cp314t-macosx_10_12_x86_64.whl
- Upload date:
- Size: 7.7 MB
- Tags: CPython 3.14t, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
faa03fd17be431db20bd7725d9a198ae4a2554284cb1bd562e1aa2445dc2c905
|
|
| MD5 |
be47b492daced6e91ba9fad1507beb77
|
|
| BLAKE2b-256 |
47f098ea4f33d92d55140b20e0610c3e55e5900d87f74d0f12a3b81a47f4ed45
|
File details
Details for the file nitor_vault-2.8.0-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: nitor_vault-2.8.0-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 7.6 MB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e7e9bf7974f5234228f7a68f02079d6a1c5049c25002a54ef54f248c4b8ae98
|
|
| MD5 |
d46c3dc5d41b80a92c65ae6818088485
|
|
| BLAKE2b-256 |
abc0081883d3d98fc5b717be0ea6e0f9c2848e9e2108b62e303eba41c78a09b6
|
File details
Details for the file nitor_vault-2.8.0-cp39-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: nitor_vault-2.8.0-cp39-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 8.4 MB
- Tags: CPython 3.9+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f10f27c8930997179b65c5942d68883226bc67fe6b2f6cdbd0505a4fcf75e3b
|
|
| MD5 |
5cba6adf9df28b916c2c70bbf02801c7
|
|
| BLAKE2b-256 |
8d3b47fbaa3754423a6380b940ccd208253c9e5b8206fa67b6bb8e9ec9194356
|
File details
Details for the file nitor_vault-2.8.0-cp39-abi3-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: nitor_vault-2.8.0-cp39-abi3-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 8.0 MB
- Tags: CPython 3.9+, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0a31a1e8745a99f425d3c96b643b5ac454b283175da81c7b793d1a0f37475fd
|
|
| MD5 |
12258fa78641f052ca490b0403dd7eaa
|
|
| BLAKE2b-256 |
bbffb01f61d5ce3208892803ec835045216e00d3d9fe97feb7d6aed7e60b4ceb
|
File details
Details for the file nitor_vault-2.8.0-cp39-abi3-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: nitor_vault-2.8.0-cp39-abi3-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 8.5 MB
- Tags: CPython 3.9+, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b307e7b9e4a38a888617b12e2ea090ab3a429cf458f9c26ea9dec4ddec8a48e
|
|
| MD5 |
cb258ee73d897f86a576d465617e725e
|
|
| BLAKE2b-256 |
c9e4f18f62b2d55690ec98fb827452d358d5c9c06baa609c4ef0e3eba7f010bc
|
File details
Details for the file nitor_vault-2.8.0-cp39-abi3-manylinux_2_34_aarch64.whl.
File metadata
- Download URL: nitor_vault-2.8.0-cp39-abi3-manylinux_2_34_aarch64.whl
- Upload date:
- Size: 7.9 MB
- Tags: CPython 3.9+, manylinux: glibc 2.34+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7acee96908690b40f2ece051768f2fbf04270dfb048e245123bf4b3b4a9a7081
|
|
| MD5 |
51901f220641f5d8a9fc6fad37c0b652
|
|
| BLAKE2b-256 |
7d0c060d8c8688d216fab342c58c4caee1eeb5b4118724dbd72d6f733a687093
|
File details
Details for the file nitor_vault-2.8.0-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: nitor_vault-2.8.0-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 6.9 MB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2088182fe55bb2f0d33d8238d7773edd0fbc38bceff327f2b612368737f8de2
|
|
| MD5 |
2f389ba81d8957f530c4991bf12e41d0
|
|
| BLAKE2b-256 |
30ce5e76af3ec25bab31852203b9bdd815271bda0d1b6784e4647781cfe4f8f2
|
File details
Details for the file nitor_vault-2.8.0-cp39-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: nitor_vault-2.8.0-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 7.7 MB
- Tags: CPython 3.9+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd5d8ad9bb778e96348fc9c332ccf3ec8cc1553ae2487d8546ad5c9f7d82ffb2
|
|
| MD5 |
b60a2febb285cef5869f3512d2db7bf6
|
|
| BLAKE2b-256 |
b55ebdb36846e017800300821a472cbbd50b4228f2a55d7da5ec76b3b25fd5b1
|