Skip to main content

A wrapper around the Google GenAI Python SDK

Project description

Pangea + Google Gen AI SDK

A wrapper around the Google Gen AI SDK that wraps the Gemini API with Pangea AI Guard. Supports Python v3.10 and greater.

Installation

pip install -U pangea-google-genai

Usage

import os

import pangea_google_genai as genai

client = genai.PangeaClient(
    api_key=os.environ.get("GEMINI_API_KEY"),
    pangea_api_key=os.environ.get("PANGEA_API_KEY"),
    pangea_input_recipe="pangea_prompt_guard",
    pangea_output_recipe="pangea_llm_response_guard",
)

response = client.models.generate_content(
    model="gemini-2.5-flash",
    contents="Explain how AI works in a few words",
)
print(response.text)

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

pangea_google_genai-0.2.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

pangea_google_genai-0.2.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file pangea_google_genai-0.2.0.tar.gz.

File metadata

  • Download URL: pangea_google_genai-0.2.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pangea_google_genai-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5295dcee7f6a47b40ae46d23caebffe8caeec5285ea58c66c204f4e3eb4dd478
MD5 eab82396273dbc2fc8916b545bb9eb61
BLAKE2b-256 0a7c41daf33c4b0b0317c876a669254ffc9d1e2b2b7dec74c522eea5191e19a6

See more details on using hashes here.

File details

Details for the file pangea_google_genai-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pangea_google_genai-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6fa2657cf2c860a6ab9f1a0253091222c7a5649ab2b460082ad797a932523509
MD5 21b674e9af2d3783777c1d8bb05a2e92
BLAKE2b-256 92162e5270fcdd6a9b4f648eb1f84a334164239b9d02677b17ea56157ec51eea

See more details on using hashes here.

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