Metadata-Version: 2.4
Name: ansible-vault
Version: 3.1.0
Summary: R/W an ansible-vault yaml file
Home-page: https://github.com/tomoh1r/ansible-vault
Author: Tomohiro NAKAMURA
Author-email: quickness.net@gmail.com
License: GPLv3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: setuptools
Requires-Dist: ansible
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: coveralls; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: isort[pyproject]; extra == "dev"
Requires-Dist: pylint; extra == "dev"
Provides-Extra: release
Requires-Dist: build; extra == "release"
Requires-Dist: twine; extra == "release"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: summary

# ansible-vault

**This is not an official Ansible project.**

This project aim to R/W an ansible-vault yaml file.

[![Test result badge.](https://github.com/tomoh1r/ansible-vault/workflows/test/badge.svg)](https://github.com/tomoh1r/ansible-vault/actions?query=workflow%3Atest)
[![Use black.](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
[![Coverage Status](https://coveralls.io/repos/github/tomoh1r/ansible-vault/badge.svg)](https://coveralls.io/github/tomoh1r/ansible-vault)

---

## Quick Start

You can install with pip.

```console
pip install ansible-vault
```

When you have an ansible-vault file, then you can read file. See below.

```python
from ansible_vault import Vault

vault = Vault('password')
data = vault.load(open('vault.yml').read())
```

When you have to write data, then you can write data to file. See below.

```python
from ansible_vault import Vault

vault = Vault('password')
vault.dump(data, open('vault.yml', 'w'))

# also you can get encrypted text
print(vault.dump(data))
```

## Contributing

See [CONTRIBUTING.md](https://github.com/tomoh1r/ansible-vault/blob/master/CONTRIBUTING.md).

---

## Links

* [Repository wiki](https://github.com/tomoh1r/ansible-vault/wiki)
