google-cloud-modelarmor
Google Cloud Modelarmor API client library
Decision gist · record as of 2026-08-14
Yes, if you are building generative AI applications on Google Cloud and need policy-based prompt/response filtering. The library is actively maintained, has low install friction, and carries a permissive license. Requires Python 3.10+, Google Cloud project setup, and authentication configuration; not suitable for non-Google-Cloud deployments.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >= 3.10.
- Requires Google Cloud project setup, billing enabled, Model Armor service enabled, and authentication credentials configured (see google-auth documentation).
- Low friction installation with a pure-Python wheel.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows commercial and private use with minimal restrictions; you must include a copy of the license and state significant changes.
last release 2026-07-08 (37 days) · last repo commit 2026-08-14 · 5,373 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,389,663 downloads/mo, #3,967 on PyPI
Alternatives
Verify before relying
pip install google-cloud-modelarmor
from google.cloud import modelarmor_v1
client = modelarmor_v1.ModelArmorClient()- Specific policy definition syntax and filtering capabilities beyond prompt/response filtering
- Performance characteristics and latency for real-time filtering in production workloads
- Integration patterns with popular generative AI frameworks and model providers
What it is and what it does
Google Cloud Model Armor is a Python client library for Google Cloud's Model Armor service, which helps protect generative AI applications from security risks. It lets you define policies that filter user prompts before they reach a model and filter model responses before they reach users, helping prevent prompt injection attacks, harmful content generation, and unintended data leakage.
The library wraps Google Cloud's gRPC API and depends on standard Google Cloud authentication and transport libraries (google-auth, grpcio, proto-plus, protobuf). It's maintained as part of the googleapis/google-cloud-python monorepo and supports current Python versions (3.10 through 3.14). Setup requires a Google Cloud project with Model Armor enabled and proper authentication configured.
Use it for
- Protect chatbot or LLM applications from prompt injection attacks by filtering user inputs before model processing
- Enforce content policies by filtering model outputs to prevent generation of harmful, inappropriate, or sensitive information
- Prevent accidental data leakage by defining policies that detect and block responses containing regulated or confidential data
- Centralize security policy management across multiple generative AI applications using Google Cloud infrastructure
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are building generative AI applications on Google Cloud and need policy-based prompt/response filtering.
The library is actively maintained, has low install friction, and carries a permissive license. Requires Python 3.10+, Google Cloud project setup, and authentication configuration; not suitable for non-Google-Cloud deployments.
Install
google-cloud-modelarmor on PyPI
Before you install
Low friction installation with a pure-Python wheel. Active maintenance with recent releases; last commit 2026-08-14. Requires Python 3.10 or later and standard Google Cloud authentication setup.
Requires Python >= 3.10. Requires Google Cloud project setup, billing enabled, Model Armor service enabled, and authentication credentials configured (see google-auth documentation).
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; you must include a copy of the license and state significant changes.
Quickstart
pip install google-cloud-modelarmor
from google.cloud import modelarmor_v1
client = modelarmor_v1.ModelArmorClient()
Verify before relying
- Specific policy definition syntax and filtering capabilities beyond prompt/response filtering
- Performance characteristics and latency for real-time filtering in production workloads
- Integration patterns with popular generative AI frameworks and model providers
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 5 packagesgoogle-api-coregoogle-authgrpcioproto-plusprotobuf |
| Maintenance | Actively maintained 37 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,389,663 / month, #3,967 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating 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 :: Internet |
Evidence: google_cloud_modelarmor-0.7.1-py3-none-any.whl
Tags
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 › “prompt injection protection”
- google-cloud-modelarmorProvides a Python client for Google Cloud Model Armor, enabling you…
- hol-guardHOL Guard is a local-first antivirus and runtime protection layer for…
- nemoguardrailsAdds programmable guardrails to LLM-based conversational applications…
Give your agent the search over MCP, or paste the wish link into any chat.
More Internet packages
Botocore provides low-level, data-driven access to Amazon Web Services APIs, serving as the foundation for the AWS CLI and boto3 libraries.
Install it if you need programmatic access to AWS services.
Provides an async client for AWS services using botocore and aiohttp, allowing you to call AWS APIs asynchronously within asyncio-based applications.
Install it if you need to call AWS services from async Python code; it is the standard way to do so.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides a platform-independent file locking mechanism to coordinate access to files across processes and threads.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides common Protocol Buffer message definitions used across Google Cloud APIs, enabling Python clients to interact with Google services.
See also google-cloud-securitycenter · google-cloud-dlp · google-cloud-discoveryengine · google-cloud-automl · google-cloud-appengine-logging · google-cloud-recommendations-ai · google-cloud-iam · google-cloud-webrisk · grpc-google-iam-v1 · google-cloud-access-context-manager