$npx skillfedfor your agent

google-genai

GenAI Python SDK

Worth itPyPI Python ModulesReleased Aug 2026298.1M downloads / moApache-2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — google_genai-2.18.1-py3-none-any.whl
v2.18.1 · released 2026-08-13 · Python >=3.10 · 10 runtime deps: anyio, google-auth, httpx, pydantic, requests, tenacity, websockets, typing-extensions

Yes. The package is actively maintained (1-day-old release), has no known vulnerabilities, permissive licensing, and low install friction. It is the official SDK for Gemini access and ranks in the top 1000 PyPI packages by downloads. Install it if you need to integrate Gemini models into Python applications; pin the version to < 3.0.0 if you want to avoid breaking changes in the next major release.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires a valid Gemini API key (GEMINI_API_KEY or GOOGLE_API_KEY environment variable) or Google Cloud credentials for enterprise use; Python >= 3.10.
  • Low friction: pure Python wheel with 10 runtime dependencies (httpx, pydantic, google-auth, requests, tenacity, websockets, anyio, typing-extensions, distro, sniffio).
  • Actively maintained with a release 1 day old and 3921 repository stars.

License · maintenance · safety

Apache-2.0 (permissive) — Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most production and proprietary projects.

last release 2026-08-13 (1 days) · last repo commit 2026-08-13 · 3,921 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 298,050,427 downloads/mo, #139 on PyPI

Verify before relying

pip install google-genai

from google import genai

client = genai.Client(api_key='GEMINI_API_KEY')
response = client.models.generate_content(
    model='gemini-2.5-flash',
    contents={'text': 'Why is the sky blue?'},
)
print(response.text)
  • Whether the 10 runtime dependencies introduce any transitive security concerns beyond the direct OSV scan.
  • Performance characteristics of the optional aiohttp backend versus the default httpx implementation.
  • Stability of the beta API endpoints used by default versus the v1 stable endpoints.
Same gist for agents: .md · .json

What it is and what it does

The Google Gen AI SDK is the official Python client for accessing Google's Gemini generative models and the Gemini Enterprise Agent Platform. It abstracts the HTTP layer and authentication, allowing developers to call model inference methods (generate_content, streaming, async variants) with either Pydantic types or plain dictionaries. The SDK supports both the public Gemini Developer API (via API key) and enterprise deployments on Google Cloud.

The package depends on httpx for HTTP transport, pydantic for type validation, google-auth for credential handling, and tenacity for automatic retry logic. It offers sync and async clients, context managers for resource cleanup, and configurable API versions (beta, v1, v1alpha). A major version bump (3.0.0) is planned with breaking changes to function-calling behavior; users should pin to < 3.0.0 to avoid unexpected updates.

Use it for

  • Build a chatbot or conversational AI application by calling generate_content with streaming responses.
  • Integrate Gemini models into data analysis pipelines to process and summarize large text or structured datasets.
  • Deploy enterprise AI agents on Google Cloud using the Gemini Enterprise Agent Platform with project-based authentication.
  • Add real-time AI capabilities to Python web services using the async client with httpx or aiohttp.
  • Prototype and test generative AI features with configurable temperature, top_p, and top_k sampling parameters.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

The package is actively maintained (1-day-old release), has no known vulnerabilities, permissive licensing, and low install friction. It is the official SDK for Gemini access and ranks in the top 1000 PyPI packages by downloads. Install it if you need to integrate Gemini models into Python applications; pin the version to < 3.0.0 if you want to avoid breaking changes in the next major release.

Install

google-genai on PyPI

Before you install

Low friction: pure Python wheel with 10 runtime dependencies (httpx, pydantic, google-auth, requests, tenacity, websockets, anyio, typing-extensions, distro, sniffio). Actively maintained with a release 1 day old and 3921 repository stars.

Requires a valid Gemini API key (GEMINI_API_KEY or GOOGLE_API_KEY environment variable) or Google Cloud credentials for enterprise use; Python >= 3.10.

License in practice

Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most production and proprietary projects.

Quickstart

pip install google-genai

from google import genai

client = genai.Client(api_key='GEMINI_API_KEY')
response = client.models.generate_content(
    model='gemini-2.5-flash',
    contents={'text': 'Why is the sky blue?'},
)
print(response.text)

Verify before relying

  • Whether the 10 runtime dependencies introduce any transitive security concerns beyond the direct OSV scan.
  • Performance characteristics of the optional aiohttp backend versus the default httpx implementation.
  • Stability of the beta API endpoints used by default versus the v1 stable endpoints.

Package facts

LicenseApache-2.0 permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
10 packages
anyiogoogle-authhttpxpydanticrequeststenacitywebsocketstyping-extensionsdistrosniffio
MaintenanceActively maintained 1 days since the last release
Last repo commit
First released
Downloads298,050,427 / month, #139 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Intended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: InternetTopic :: Software Development :: Libraries :: Python Modules

Evidence: google_genai-2.18.1-py3-none-any.whl

Tags

Capabilities
gemini api python clientgoogle generative ai sdkllm integration pythongemini enterprise agent platformgoogle ai model accessgenerative model api wrappergemini developer api
Topics
llm-clientgoogle-cloudgenerative-ai

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “gemini enterprise agent platform”

  • google-genaiPython SDK for integrating Google's Gemini generative models and the…
  • google-agents-cliA CLI toolchain that equips coding agents (Claude Code, Antigravity…
  • google-cloud-aiplatformPython SDK for building, deploying, and managing AI agents and…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also google-generativeai · google-cloud-aiplatform · vertexai · google-antigravity · llama-index-embeddings-google-genai · google-agents-cli · notebooklm-py · opentelemetry-instrumentation-google-genai · langchain-google-genai · google-ai-generativelanguage

Further reading