Metadata-Version: 2.4
Name: spax-secret
Version: 1.1.3
Summary: Secret manager library for sixpetal network
Author-email: Prashant Kumar Prasad <info@sixpetal.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/krprashant94/spax-secret
Project-URL: Issues, https://github.com/krprashant94/spax-secret/issues
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cryptography>=48.0.0
Requires-Dist: httpx>=0.28.1
Requires-Dist: pydantic>=2.13.4
Dynamic: license-file

# spax-secret

spax-secret is a Python client for storing and retrieving application secrets as encrypted key/value pairs through the Sixpetal secret service.

## Features

- Store secrets for a specific project and environment
- Retrieve one or many values with a single call
- Support batch operations for reads and writes
- Verify signatures and decrypt values before returning them to your application

## Installation

Install from PyPI:

```bash
pip install spax-secret
```

```bash
twine upload dist/* --repository spax-secret --config-file .pypirc 
```

## Requirements

- Python 3.12+
- Dependencies are installed automatically with the package

## Quick Start

```python
from spax_secret import SecretManager

sm = SecretManager("my-project", "development")

sm.set("API_KEY", "super-secret-value")
print(sm.get("API_KEY"))
```

## Reading Multiple Values

```python
from spax_secret import SecretManager

sm = SecretManager("my-project", "production")
values = sm.get_all(["API_KEY", "DB_HOST"])

for item in values:
    print(item.key, item.value)
```

## Batch Operations

```python
from spax_secret import SecretManager
from spax_secret.models import KeyValuePair

sm = SecretManager("my-project", "staging")

pairs = [
    KeyValuePair(key="APP_NAME", value="spax-secret"),
    KeyValuePair(key="DEBUG", value="true"),
]

sm.set_all(pairs)
```

## Notes

- The client communicates with the remote secret service endpoint used by the package.
- Make sure the target project and environment names are valid for your deployment.

## License

This project is licensed under the MIT License.

## Author

Sixpetal Developer
