Metadata-Version: 2.1
Name: configvault
Version: 0.0.2
Summary: Secure, encrypted configuration storage for Python applications
Author-email: "Ioannis D (devcoons)" <support@devcoons.com>
License: MIT License
        
        Copyright (c) 2024 Ioannis D. (devcoons)
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Homepage, https://github.com/devcoons/configvault
Project-URL: Issues, https://github.com/devcoons/configvault/issues
Project-URL: Documentation, https://github.com/devcoons/configvault/wiki
Project-URL: Source, https://github.com/devcoons/configvault
Keywords: configvault,configuration,encryption,secure storage,config management
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Security :: Cryptography
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cryptography>=3.4.7
Provides-Extra: dev
Requires-Dist: pip-tools; extra == "dev"
Requires-Dist: pytest; extra == "dev"

# ConfigVault

[![PyPI - Version](https://img.shields.io/pypi/v/configvault?style=for-the-badge)](https://pypi.org/project/configvault)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/configvault?style=for-the-badge)
![GitHub License](https://img.shields.io/github/license/devcoons/configvault?style=for-the-badge)
![PyPI - Wheel](https://img.shields.io/pypi/wheel/configvault?style=for-the-badge&color=%23F0F)

`ConfigVault` is a Python library that provides secure, encrypted configuration storage for sensitive data. It allows you to store, retrieve, and manage configuration settings with ease and security. Perfect for applications that require protected access to configuration details like API keys or database credentials.

## Table of Contents

- [Installation](#installation)
- [Features](#features)
- [Usage](#usage)
  - [Basic Initialization](#basic-initialization)
  - [Storing Configuration](#storing-configuration)
  - [Retrieving Configuration](#retrieving-configuration)
  - [Removing Configurations](#removing-configurations)
- [Security](#security)

## Installation

To use ConfigVault, install it using pip:

```
pip install configvault
```


## Features

- Secure, encrypted storage for sensitive configuration data.
- Supports storing, retrieving, and removing specific configurations by key.
- Option to overwrite existing configurations with @force=True@.
- Ability to clear all stored configurations at once.

## Usage

### Basic Initialization

To get started, initialize `ConfigVault` with a storage folder path and a password for key derivation. A unique, strong password is recommended.

```
from configvault import ConfigVault

vault = ConfigVault(folder_path='path/to/storage', password='my_secure_password')
```


### Storing Configuration

Store a configuration dictionary securely under a specific key. Set `force=True` if you want to overwrite an existing entry.

```
data = {"database": "mydb", "user": "admin", "password": "secure_password"} 
vault.store("db_config", data, force=True) # Overwrites if "db_config" exists
```


### Retrieving Configuration

Retrieve and decrypt stored data by its key.

```
retrieved_data = vault.retrieve("db_config") 
print(retrieved_data) # Output: {"database": "mydb", "user": "admin", "password": "secure_password"}
```


### Removing Configurations

To remove a specific configuration by its key, use the `remove` method.

```
vault.remove("db_config") # Removes the configuration with key "db_config"
```


To remove all stored configurations, use the `remove_all` method:

```
vault.remove_all() # Clears all configurations
```


## Security

ConfigVault uses @cryptography@ for secure encryption based on a key derived from your password. For optimal security:

- Use a strong, unique password.
- Store your password securely (e.g., in an environment variable).
- Set a unique folder path for each application's configurations.

ConfigVault is ideal for applications that need sensitive data management, providing a reliable, encrypted storage solution.
