mcpField
G
google-genai-sdk-python

google-genai-sdk-python

github.com/cnemriDevelopment128111 installsUpdated 38w ago
Repository

About google-genai-sdk-python

A reference skill for writing idiomatic Python with the Google GenAI SDK and Gemini API. It helps developers find guidance for setup, generation, multimodal inputs, and other SDK tasks.

Key features

  1. 01SDK setup and client guidance
  2. 02Text generation and chat patterns
  3. 03Reasoning and structured output
  4. 04Multimodal inputs and media generation
  5. 05Tool calling and source inspection

Use cases

  1. 01Initialize a Gemini API client
  2. 02Implement a multi-turn chat
  3. 03Generate structured JSON output
  4. 04Add image, audio, or video inputs

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/cnemri/google-genai-skills --skill google-genai-sdk-python

After installing, type/google-genai-sdk-pythonin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
chat.md
media_generation.md
models.md
multimodal_inputs.md
reasoning.md
setup.md
source_code.md
structured_output.md
text_generation.md
tools.md

Details

From the project README

Google GenAI Python SDK Skill

Use this skill to write high-quality, idiomatic Python code for the Gemini API.

Reference Materials

Identify the user's task and refer to the relevant file:

  • Setup & Client: Installation, auth, client initialization.
  • Models: Recommended models (Flash, Pro, Lite, Imagen, Veo).
  • Text Generation: Basic inference, streaming, system instructions, safety.
  • Chat: Multi-turn conversations and history.
  • Reasoning: Thinking config (thinking_level / thinking_budget), thought signatures.
  • Structured Output: JSON schemas, Pydantic models, Enums.
  • Multimodal Inputs: Images, audio, video, PDFs, media resolution.
  • Tools: Function calling, code execution, Google Search grounding.
  • Media Generation: Image generation/editing (Imagen), video generation (Veo).
  • Source Code: Raw SDK source code for deep inspection.

Core Principles

  1. Unified SDK: Always use google-genai.
  2. Stateless Models: Use client.models for single requests.
  3. Stateful Chats: Use client.chats for conversations.
  4. Types: Import from google.genai.types.

Comments

Markdown supported