Metadata-Version: 2.1
Name: nitor-vault
Version: 0.56
Summary: Vault for storing locally encrypted data in S3 using KMS keys
Author-email: Pasi Niemi <pasi@nitor.com>
License: Apache 2.0
Project-URL: Repository, http://github.com/NitorCreations/vault
Project-URL: Download, https://github.com/NitorCreations/vault/tarball/0.56
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: argcomplete
Requires-Dist: cryptography
Requires-Dist: future
Requires-Dist: requests
Requires-Dist: threadlocal-aws
Requires-Dist: pypiwin32; platform_system == "Windows"
Requires-Dist: win-unicode-console; platform_system == "Windows"
Requires-Dist: wmi; platform_system == "Windows"
Provides-Extra: test
Requires-Dist: coverage; extra == "test"
Requires-Dist: coveralls; extra == "test"
Provides-Extra: build
Requires-Dist: build; extra == "build"
Requires-Dist: setuptools; extra == "build"
Requires-Dist: twine; extra == "build"
Requires-Dist: wheel; extra == "build"

# nitor-vault

Python vault implementation.

See the [root readme](../README.md) for more information.

## Dependencies

Python dependencies are specified in [pyproject.toml](./pyproject.toml).
The `requirements.txt` file is generated by pip compile and should not be modified manually.

Use the provided shell script to update the requirements file.
First install [uv](https://github.com/astral-sh/uv) (recommended),
or alternatively `pip-tools` using [pipx](https://github.com/pypa/pipx).
Then run:

```shell
./compile-requirements.sh
# See help
./compile-requirements.sh -h
```

## Development

uv is the recommended way to handle virtual environments for development.

Create a venv and install all dependencies:

```shell
uv sync --all-extras
```

You can then run commands directly with the venv using `uv run`,
or activate the venv manually first.
The uv default venv location is `.venv`.

```shell
source .venv/bin/activate
# or Windows
.venv\Scripts\activate
```

The vault CLI can be run without installing using:

```shell
uv run python n_vault/cli.py
# or with venv activated
python3 n_vault/cli.py
```

Or install inside venv with:

```shell
# With uv
uv pip install .
# Normal venv
python -m pip install .
```

After installing, you will have `vault` available in path.

## Release

Use the provided shell script.
Note that you need to have a venv with the extra dependencies installed active when running the script.

```shell
./release.sh
# See help
./release.sh -h
```

## Code formatting and linting

Code formatting and linting with [ruff](https://github.com/charliermarsh/ruff).

These are configured with a custom line length limit of 120.
The configs can be found in [pyproject.toml](./pyproject.toml).

Usage:

```shell
ruff format
ruff check --fix
```

These can also be integrated to IDEs / editors or run as a pre-commit hook.
See the documentation for the [Ruff extension](https://github.com/astral-sh/ruff-vscode) for VS Code.

Using with [pre-commit](https://pre-commit.com/) (run from repo root):

```shell
# setup to be run automatically on git commit
pre-commit install

# run manually
pre-commit run --all-files
```
