A convenient secret retrieval proxy backed by cloud scale secret vaults
Project description
GenAIKeys [WIP]
GenAIKeys is a Python library that streamlines API key management for Generative AI applications by securely provisioning and injecting credentials into your codebase.
Disclaimer: Please exercise caution when using this package in production environments. We recommend that you review the codebase and ensure that it meets your security requirements before deploying it in a production environment.
Features
- 🔐 Secure API key management for GenAI services
- 🚀 Zero environment variable configuration
- ⚡️ Direct integration with cloud secret vaults
- 🔌 Built-in support for OpenAI, Anthropic, and Google Gemini
- 🛠 Extensible architecture for custom secret backends
Installation
pip install GenAIKeys
Quick Start
from genaikeys import SecretKeeper
# Initialize GenAIKeys
skp = SecretKeeper.from_defaults()
# Get API keys directly
api_key = skp.get('huggingface-api-key')
# Use convenience methods
openai_key = skp.get_openai_key()
anthropic_key = skp.get_anthropic_key()
gemini_key = skp.get_gemini_key()
Configuration
-
By default, GenAIKeys uses the
Azure Key Vaultsecret backend. You can configure the secret backend by setting theSECRET_KEEPER_BACKENDenvironment variable to one of the following values:AZUREAWSGCP
-
We recommend setting the
SECRET_KEEPER_BACKENDenvironment variable in a persistent configuration file like.bashrcor.zshrc.* -
You will also need to provide the configurations for the secret backend you choose.
Azure Key Vault
- The following environment variables are required for the
Azure Key Vaultsecret backend:AZURE_KEY_VAULT_URL
- Optionally you can also provide the following environment variables:
MANGED_IDENTITY_CLIENT_ID(for User Assigned Managed Identity authentication)
AWS Secrets Manager [WIP]
Google Secret Manager [WIP]
Documentation
For detailed usage instructions, API reference, and advanced configuration options, visit our documentation.
Contributing
We welcome contributions! Please see our contribution guidelines before submitting pull requests.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file genaikeys-0.0.1rc1.tar.gz.
File metadata
- Download URL: genaikeys-0.0.1rc1.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b693e03d64f151837dd5f727b71c5912fd2a05a2641dec81e10ba6e0d53240b6
|
|
| MD5 |
2e6643fa1c0faae8c45e43f2a867bcf8
|
|
| BLAKE2b-256 |
f15f93fe7f2506f83599157cdb0c97524e1531e5daed7a84b0f86b8bbda74b10
|
Provenance
The following attestation bundles were made for genaikeys-0.0.1rc1.tar.gz:
Publisher:
python-publish.yml on ndamulelonemakh/genaikeys
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
genaikeys-0.0.1rc1.tar.gz -
Subject digest:
b693e03d64f151837dd5f727b71c5912fd2a05a2641dec81e10ba6e0d53240b6 - Sigstore transparency entry: 150990735
- Sigstore integration time:
-
Permalink:
ndamulelonemakh/genaikeys@40e29c8d3cbe37f8c51bd7a1576607fe6cb61f7d -
Branch / Tag:
refs/tags/0.0.1rc1 - Owner: https://github.com/ndamulelonemakh
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@40e29c8d3cbe37f8c51bd7a1576607fe6cb61f7d -
Trigger Event:
release
-
Statement type:
File details
Details for the file genaikeys-0.0.1rc1-py3-none-any.whl.
File metadata
- Download URL: genaikeys-0.0.1rc1-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ae9236effc8e1e122fae7b29ce55707b0e84e2cfb42603ca08b28d2c521dca6
|
|
| MD5 |
fe3b7d57fde0e3516278d5e78ee117de
|
|
| BLAKE2b-256 |
fc770047d702713bc11033ba7eb0dfd97f9d1cb546eaabad4abfa7e8b8619235
|
Provenance
The following attestation bundles were made for genaikeys-0.0.1rc1-py3-none-any.whl:
Publisher:
python-publish.yml on ndamulelonemakh/genaikeys
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
genaikeys-0.0.1rc1-py3-none-any.whl -
Subject digest:
0ae9236effc8e1e122fae7b29ce55707b0e84e2cfb42603ca08b28d2c521dca6 - Sigstore transparency entry: 150990736
- Sigstore integration time:
-
Permalink:
ndamulelonemakh/genaikeys@40e29c8d3cbe37f8c51bd7a1576607fe6cb61f7d -
Branch / Tag:
refs/tags/0.0.1rc1 - Owner: https://github.com/ndamulelonemakh
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@40e29c8d3cbe37f8c51bd7a1576607fe6cb61f7d -
Trigger Event:
release
-
Statement type: