Skip to main content

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.

PyPI version License

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 Vault secret backend. You can configure the secret backend by setting the SECRET_KEEPER_BACKEND environment variable to one of the following values:

    • AZURE
    • AWS
    • GCP
  • We recommend setting the SECRET_KEEPER_BACKEND environment variable in a persistent configuration file like .bashrc or .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 Vault secret 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

genaikeys-0.0.1rc1.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

genaikeys-0.0.1rc1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

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

Hashes for genaikeys-0.0.1rc1.tar.gz
Algorithm Hash digest
SHA256 b693e03d64f151837dd5f727b71c5912fd2a05a2641dec81e10ba6e0d53240b6
MD5 2e6643fa1c0faae8c45e43f2a867bcf8
BLAKE2b-256 f15f93fe7f2506f83599157cdb0c97524e1531e5daed7a84b0f86b8bbda74b10

See more details on using hashes here.

Provenance

The following attestation bundles were made for genaikeys-0.0.1rc1.tar.gz:

Publisher: python-publish.yml on ndamulelonemakh/genaikeys

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for genaikeys-0.0.1rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 0ae9236effc8e1e122fae7b29ce55707b0e84e2cfb42603ca08b28d2c521dca6
MD5 fe3b7d57fde0e3516278d5e78ee117de
BLAKE2b-256 fc770047d702713bc11033ba7eb0dfd97f9d1cb546eaabad4abfa7e8b8619235

See more details on using hashes here.

Provenance

The following attestation bundles were made for genaikeys-0.0.1rc1-py3-none-any.whl:

Publisher: python-publish.yml on ndamulelonemakh/genaikeys

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page