Name | nitor-vault JSON |
Version |
2.6.1
JSON |
| download |
home_page | None |
Summary | Vault for storing locally encrypted data in S3 using KMS keys |
upload_time | 2024-12-12 09:19:51 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | Apache-2.0 |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
|
coveralls test coverage |
No coveralls.
|
# 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](https://aws.amazon.com/kms/) keys.
See the [repo](https://github.com/NitorCreations/vault) root readme for more general information.
## Vault CLI
```console
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 completion
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
status, --status Print vault stack information
init, -i, --init Initialize a new KMS key and S3 bucket [aliases: i]
update, -u, --update Update the vault CloudFormation stack [aliases: u]
lookup, -l, --lookup Output secret value for given key [aliases: l]
store, -s, --store Store a new key-value pair [aliases: s]
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](https://github.com/pypa/pipx) or [uv](https://github.com/astral-sh/uv)
to install the Python vault package from [PyPI](https://pypi.org/project/nitor-vault/)
globally in an isolated environment.
```shell
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](https://rustup.rs/) to be able to build the Rust library.
From the repo root:
```shell
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.
```shell
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:
```python
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](https://pyo3.rs/) for creating a native Python module from Rust code.
- [Maturin](https://www.maturin.rs) for building and packaging the Python module from Rust.
### Workflow
You can use [uv](https://github.com/astral-sh/uv) or the traditional Python and pip combo.
First, create a virtual env:
```shell
# 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:
```shell
# uv
uv run maturin develop
# venv
maturin develop
```
Run Python CLI:
```shell
# uv
uv run python/n_vault/cli.py -h
# venv
python3 python/n_vault/cli.py -h
```
Install and run vault inside virtual env:
```shell
# uv
uv pip install .
uv run vault -h
# venv
pip install .
vault -h
```
Raw data
{
"_id": null,
"home_page": null,
"name": "nitor-vault",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "Pasi Niemi <pasi@nitor.com>, Akseli Lukkarila <akseli.lukkarila@nitor.com>",
"download_url": "https://files.pythonhosted.org/packages/78/30/36d6e4742a25ea3f3b0389ed466bae457f7ddce6fc772bda008cf37c7f3b/nitor_vault-2.6.1.tar.gz",
"platform": null,
"description": "# nitor-vault\n\nPython Vault CLI and library implementation using the Rust vault exposed as a Python extension module.\n\nEncrypt data using client-side encryption with [AWS KMS](https://aws.amazon.com/kms/) keys.\n\nSee the [repo](https://github.com/NitorCreations/vault) root readme for more general information.\n\n## Vault CLI\n\n```console\nEncrypted AWS key-value storage utility\n\nUsage: vault [OPTIONS] [COMMAND]\n\nCommands:\n all, -a, --all List available secrets [aliases: a, list, ls]\n completion, --completion Generate shell completion\n delete, -d, --delete Delete an existing key from the store [aliases: d]\n describe, --describe Print CloudFormation stack parameters for current configuration\n decrypt, -y, --decrypt Directly decrypt given value [aliases: y]\n encrypt, -e, --encrypt Directly encrypt given value [aliases: e]\n exists, --exists Check if a key exists\n info, --info Print vault information\n id Print AWS user account information\n status, --status Print vault stack information\n init, -i, --init Initialize a new KMS key and S3 bucket [aliases: i]\n update, -u, --update Update the vault CloudFormation stack [aliases: u]\n lookup, -l, --lookup Output secret value for given key [aliases: l]\n store, -s, --store Store a new key-value pair [aliases: s]\n help Print this message or the help of the given subcommand(s)\n\nOptions:\n -b, --bucket <BUCKET> Override the bucket name [env: VAULT_BUCKET=]\n -k, --key-arn <ARN> Override the KMS key ARN [env: VAULT_KEY=]\n -p, --prefix <PREFIX> Optional prefix for key name [env: VAULT_PREFIX=]\n -r, --region <REGION> Specify AWS region for the bucket [env: AWS_REGION=]\n --vaultstack <NAME> Specify CloudFormation stack name to use [env: VAULT_STACK=]\n --id <ID> Specify AWS IAM access key ID\n --secret <SECRET> Specify AWS IAM secret access key\n --profile <PROFILE> Specify AWS profile name to use [env: AWS_PROFILE=]\n -q, --quiet Suppress additional output and error messages\n -h, --help Print help (see more with '--help')\n -V, --version Print version\n```\n\n### Install\n\n#### From PyPI\n\nUse [pipx](https://github.com/pypa/pipx) or [uv](https://github.com/astral-sh/uv)\nto install the Python vault package from [PyPI](https://pypi.org/project/nitor-vault/)\nglobally in an isolated environment.\n\n```shell\npipx install nitor-vault\n# or\nuv tool install nitor-vault\n```\n\nThe command `vault` should now be available in path.\n\n#### From source\n\nBuild and install locally from source code using pip.\nThis requires a [Rust toolchain](https://rustup.rs/) to be able to build the Rust library.\nFrom the repo root:\n\n```shell\ncd python-pyo3\npip install .\n# or with uv\nuv pip install .\n```\n\nCheck the command is found in path.\nIf you ran the install command inside a virtual env,\nit will only be installed inside the venv,\nand will not be available in path globally.\n\n```shell\nwhich -a vault\n```\n\n## Vault library\n\nThis Python package can also be used as a Python library to interact with the Vault directly from Python code.\n\nAdd the `nitor-vault` package to your project dependencies,\nor install directly with pip.\n\nExample usage:\n\n```python\nfrom n_vault import Vault\n\nif not Vault().exists(\"key\"):\n Vault().store(\"key\", \"value\")\n\nkeys = Vault().list_all()\n\nvalue = Vault().lookup(\"key\")\n\nif Vault().exists(\"key\"):\n Vault().delete(\"key\")\n\n# specify vault parameters\nvault = Vault(vault_stack=\"stack-name\", profile=\"aws-credentials-name\")\nvalue = vault.lookup(\"key\")\n```\n\n## Development\n\nUses:\n\n- [PyO3](https://pyo3.rs/) for creating a native Python module from Rust code.\n- [Maturin](https://www.maturin.rs) for building and packaging the Python module from Rust.\n\n### Workflow\n\nYou can use [uv](https://github.com/astral-sh/uv) or the traditional Python and pip combo.\n\nFirst, create a virtual env:\n\n```shell\n# uv\nuv sync --all-extras\n# pip\npython3 -m venv .venv\nsource .venv/bin/activate\npip install '.[dev]'\n```\n\nAfter making changes to Rust code, build and install module:\n\n```shell\n# uv\nuv run maturin develop\n# venv\nmaturin develop\n```\n\nRun Python CLI:\n\n```shell\n# uv\nuv run python/n_vault/cli.py -h\n# venv\npython3 python/n_vault/cli.py -h\n```\n\nInstall and run vault inside virtual env:\n\n```shell\n# uv\nuv pip install .\nuv run vault -h\n# venv\npip install .\nvault -h\n```\n\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Vault for storing locally encrypted data in S3 using KMS keys",
"version": "2.6.1",
"project_urls": {
"Homepage": "https://github.com/NitorCreations/vault",
"Repository": "https://github.com/NitorCreations/vault"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "ed209133c5ed0ef44adeffa481f02d2eed9c2aa435d4289d1ec9ca3e81eedc48",
"md5": "406f5d7ba8584e544aa9699582302dbb",
"sha256": "c07c72a113432c8509be2e0788654e83421e057608f71c6bc41550905af2cf5f"
},
"downloads": -1,
"filename": "nitor_vault-2.6.1-cp39-abi3-macosx_10_12_x86_64.whl",
"has_sig": false,
"md5_digest": "406f5d7ba8584e544aa9699582302dbb",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.9",
"size": 6002347,
"upload_time": "2024-12-12T09:19:41",
"upload_time_iso_8601": "2024-12-12T09:19:41.700813Z",
"url": "https://files.pythonhosted.org/packages/ed/20/9133c5ed0ef44adeffa481f02d2eed9c2aa435d4289d1ec9ca3e81eedc48/nitor_vault-2.6.1-cp39-abi3-macosx_10_12_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "85a95b76c9612c9c4b9e8303cbae63607eac618161b2fc42d16c348983500aed",
"md5": "c1a46a155d6bbc44dc222feb0e25cbfa",
"sha256": "b597adaf6502a2564cdaf921c7f1e25185b13b4f1a359ef0beda15c4a61f594d"
},
"downloads": -1,
"filename": "nitor_vault-2.6.1-cp39-abi3-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "c1a46a155d6bbc44dc222feb0e25cbfa",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.9",
"size": 5811235,
"upload_time": "2024-12-12T09:19:39",
"upload_time_iso_8601": "2024-12-12T09:19:39.716101Z",
"url": "https://files.pythonhosted.org/packages/85/a9/5b76c9612c9c4b9e8303cbae63607eac618161b2fc42d16c348983500aed/nitor_vault-2.6.1-cp39-abi3-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "37cf6865052d329a7084b28af68abb8d234ffa8d4552c2ba7fd10ebb1784d071",
"md5": "02f2c16b91b2ce770583b825ac9ec099",
"sha256": "09889ee64a0f1169d84e253add45658ad73a14a7ba486bc011ad4cda43a391a9"
},
"downloads": -1,
"filename": "nitor_vault-2.6.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
"has_sig": false,
"md5_digest": "02f2c16b91b2ce770583b825ac9ec099",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.9",
"size": 5252449,
"upload_time": "2024-12-12T09:19:31",
"upload_time_iso_8601": "2024-12-12T09:19:31.443892Z",
"url": "https://files.pythonhosted.org/packages/37/cf/6865052d329a7084b28af68abb8d234ffa8d4552c2ba7fd10ebb1784d071/nitor_vault-2.6.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "3ce668f18da8d4a363831cf9f6d9920a89ad5a7ce431b94136a1be24454383ee",
"md5": "75a981c7bb761c3b76fe07f799880135",
"sha256": "e8b469d7738c5290374c39bf9ecbe3ef58ae3e9eff12e428b2493015e9708ed5"
},
"downloads": -1,
"filename": "nitor_vault-2.6.1-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl",
"has_sig": false,
"md5_digest": "75a981c7bb761c3b76fe07f799880135",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.9",
"size": 5569967,
"upload_time": "2024-12-12T09:19:34",
"upload_time_iso_8601": "2024-12-12T09:19:34.208219Z",
"url": "https://files.pythonhosted.org/packages/3c/e6/68f18da8d4a363831cf9f6d9920a89ad5a7ce431b94136a1be24454383ee/nitor_vault-2.6.1-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "3bff016c052a7a6a23c49009a447e7c00dc604e7d48a0a611cdc67f0b15fed99",
"md5": "bcf16f4d0113016d582e8357576460fc",
"sha256": "ab92214ce13ed05fb0fcd1fd178ffe6f4db3e368fe07ee3b3e647059766815db"
},
"downloads": -1,
"filename": "nitor_vault-2.6.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "bcf16f4d0113016d582e8357576460fc",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.9",
"size": 5510754,
"upload_time": "2024-12-12T09:19:36",
"upload_time_iso_8601": "2024-12-12T09:19:36.819556Z",
"url": "https://files.pythonhosted.org/packages/3b/ff/016c052a7a6a23c49009a447e7c00dc604e7d48a0a611cdc67f0b15fed99/nitor_vault-2.6.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "3c238ef16f85c3a17043bbf1127c51b0a89017a043efb8767991d9c002bdd600",
"md5": "d8d10351690ff46046b3ef4910e5df33",
"sha256": "1631a05d7d8ff4a96611fb1a8a0c7db073f17c156a26f1445c7e2b13c775250a"
},
"downloads": -1,
"filename": "nitor_vault-2.6.1-cp39-abi3-musllinux_1_2_aarch64.whl",
"has_sig": false,
"md5_digest": "d8d10351690ff46046b3ef4910e5df33",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.9",
"size": 6724846,
"upload_time": "2024-12-12T09:19:43",
"upload_time_iso_8601": "2024-12-12T09:19:43.796895Z",
"url": "https://files.pythonhosted.org/packages/3c/23/8ef16f85c3a17043bbf1127c51b0a89017a043efb8767991d9c002bdd600/nitor_vault-2.6.1-cp39-abi3-musllinux_1_2_aarch64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "0817e6ebba4341d8d21e83ae4766647649a0c10ebc6617e58123cfd73f4d5f5a",
"md5": "79966d49d7e5f77eeeb98624dddf5ac6",
"sha256": "1539652f1ecff06d87410f0408e960b6707cbbdb7993e193f3c6eb094303a180"
},
"downloads": -1,
"filename": "nitor_vault-2.6.1-cp39-abi3-musllinux_1_2_i686.whl",
"has_sig": false,
"md5_digest": "79966d49d7e5f77eeeb98624dddf5ac6",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.9",
"size": 6544116,
"upload_time": "2024-12-12T09:19:46",
"upload_time_iso_8601": "2024-12-12T09:19:46.859304Z",
"url": "https://files.pythonhosted.org/packages/08/17/e6ebba4341d8d21e83ae4766647649a0c10ebc6617e58123cfd73f4d5f5a/nitor_vault-2.6.1-cp39-abi3-musllinux_1_2_i686.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "d264d25610eef95c2a70b8c1a4de21156064ecfe212a7478a13a8ace9bb7295b",
"md5": "ab47a47e61cf7827141a88ea64d9c51f",
"sha256": "29ec8d15f9a7524f01f78bb44485d54262b460cc7313919a3628c22bc02e40d9"
},
"downloads": -1,
"filename": "nitor_vault-2.6.1-cp39-abi3-musllinux_1_2_x86_64.whl",
"has_sig": false,
"md5_digest": "ab47a47e61cf7827141a88ea64d9c51f",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.9",
"size": 6814786,
"upload_time": "2024-12-12T09:19:48",
"upload_time_iso_8601": "2024-12-12T09:19:48.790552Z",
"url": "https://files.pythonhosted.org/packages/d2/64/d25610eef95c2a70b8c1a4de21156064ecfe212a7478a13a8ace9bb7295b/nitor_vault-2.6.1-cp39-abi3-musllinux_1_2_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "51a118242f6f0a5f4f3bca8d9b4ee75227c9d3a83f9f6246a926c5d413c0a5c6",
"md5": "7472a26299db94bdb3baa2c14f86b396",
"sha256": "aecb2c39ba3b2ddbe6a58a189d0c8435cb5a5e9c70d6815c4f7315374d2ae716"
},
"downloads": -1,
"filename": "nitor_vault-2.6.1-cp39-abi3-win32.whl",
"has_sig": false,
"md5_digest": "7472a26299db94bdb3baa2c14f86b396",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.9",
"size": 4501818,
"upload_time": "2024-12-12T09:19:55",
"upload_time_iso_8601": "2024-12-12T09:19:55.301713Z",
"url": "https://files.pythonhosted.org/packages/51/a1/18242f6f0a5f4f3bca8d9b4ee75227c9d3a83f9f6246a926c5d413c0a5c6/nitor_vault-2.6.1-cp39-abi3-win32.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "dd708e4bba277321fc7aa490ec40210307daeed27b3f334b7c7fc8aabcde1b35",
"md5": "a7bcc421114ca52295cf52229340d051",
"sha256": "21653688a58efa4fe9909905a2206db4c313089985fe736e59261cfcea5c992b"
},
"downloads": -1,
"filename": "nitor_vault-2.6.1-cp39-abi3-win_amd64.whl",
"has_sig": false,
"md5_digest": "a7bcc421114ca52295cf52229340d051",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.9",
"size": 5210467,
"upload_time": "2024-12-12T09:19:53",
"upload_time_iso_8601": "2024-12-12T09:19:53.112455Z",
"url": "https://files.pythonhosted.org/packages/dd/70/8e4bba277321fc7aa490ec40210307daeed27b3f334b7c7fc8aabcde1b35/nitor_vault-2.6.1-cp39-abi3-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "783036d6e4742a25ea3f3b0389ed466bae457f7ddce6fc772bda008cf37c7f3b",
"md5": "d2006642f955290d42d1d3dcb1164f9a",
"sha256": "d346586fcc471356ddf22c9713a209d0cb29a7b1406bbd6f5bfe8be491b6cbf7"
},
"downloads": -1,
"filename": "nitor_vault-2.6.1.tar.gz",
"has_sig": false,
"md5_digest": "d2006642f955290d42d1d3dcb1164f9a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 57553,
"upload_time": "2024-12-12T09:19:51",
"upload_time_iso_8601": "2024-12-12T09:19:51.335540Z",
"url": "https://files.pythonhosted.org/packages/78/30/36d6e4742a25ea3f3b0389ed466bae457f7ddce6fc772bda008cf37c7f3b/nitor_vault-2.6.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-12 09:19:51",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "NitorCreations",
"github_project": "vault",
"travis_ci": true,
"coveralls": false,
"github_actions": true,
"lcname": "nitor-vault"
}