pygitguardian
Python Wrapper for GitGuardian's API -- Scan security policy breaks everywhere
Decision gist · record as of 2026-08-14
Yes. Active maintenance, no known vulnerabilities, low install friction, and permissive MIT license make this a safe choice. Install it if you need to integrate GitGuardian's secret detection into Python workflows—it's the official client and used by GitGuardian Shield itself. Requires a valid API key and internet access to the GitGuardian service.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a valid GitGuardian API key (obtain from dashboard.gitguardian.com).
- Python 3.8+ required; Python 3.8 support is deprecated.
- Low install friction with a pure-Python wheel distribution.
License · maintenance · safety
MIT (permissive) — MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.
last release 2026-07-28 (17 days) · last repo commit 2026-08-12 · 89 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 391,201 downloads/mo, #7,016 on PyPI
Alternatives
Verify before relying
pip install pygitguardian
from pygitguardian import GGClient
import os
api_key = os.getenv("GITGUARDIAN_API_KEY")
client = GGClient(api_key=api_key)
if client.health_check().success:
result = client.content_scan("your text to scan")- Rate limits or quota constraints on the GitGuardian API itself (not documented in this fact sheet)
- Whether the 200+ secret types detection covers all common credential formats relevant to your use case
What it is and what it does
py-gitguardian is a Python wrapper around GitGuardian's API that lets you scan text content for secrets and security vulnerabilities. It handles the HTTP communication and response parsing, exposing methods like `content_scan()` for single documents and `multi_content_scan()` for batch operations. The library uses marshmallow for request/response serialization and includes model classes that can be converted to JSON or dictionaries.
You typically use it to integrate secret detection into CI/CD pipelines, pre-commit hooks, or custom scanning workflows. The client requires an API key and supports health checks to validate credentials before scanning. Results are returned as structured objects that expose detected secrets, their severity, and remediation guidance.
Use it for
- Scan code repositories or files in CI/CD pipelines to prevent secrets from being committed
- Integrate secret detection into pre-commit hooks to catch credentials before they reach version control
- Build custom security scanning tools that check multiple data sources (logs, config files, chat exports) for leaked credentials
- Validate API keys and check GitGuardian service health before running large batch scans
- Automate compliance checks by scanning application configuration or deployment artifacts for hardcoded secrets
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Active maintenance, no known vulnerabilities, low install friction, and permissive MIT license make this a safe choice. Install it if you need to integrate GitGuardian's secret detection into Python workflows—it's the official client and used by GitGuardian Shield itself. Requires a valid API key and internet access to the GitGuardian service.
Install
pygitguardian on PyPI
Before you install
Low install friction with a pure-Python wheel distribution. Actively maintained with a release 17 days ago and no known vulnerabilities. Depends on standard libraries (requests, marshmallow) with clear deprecation messaging for Python 3.8 support.
Requires a valid GitGuardian API key (obtain from dashboard.gitguardian.com). Python 3.8+ required; Python 3.8 support is deprecated.
License in practice
MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.
Quickstart
pip install pygitguardian
from pygitguardian import GGClient
import os
api_key = os.getenv("GITGUARDIAN_API_KEY")
client = GGClient(api_key=api_key)
if client.health_check().success:
result = client.content_scan("your text to scan")
Verify before relying
- Rate limits or quota constraints on the GitGuardian API itself (not documented in this fact sheet)
- Whether the 200+ secret types detection covers all common credential formats relevant to your use case
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 5 packagesmarshmallowrequestsmarshmallow-dataclasstyping-extensionssetuptools |
| Maintenance | Actively maintained 17 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 391,201 / month, #7,016 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Security |
Evidence: pygitguardian-1.33.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 › “gitguardian api client”
- pygitguardianAPI client library for GitGuardian's secret detection service,…
- ggshieldggshield is a CLI tool that scans files, repositories, Docker images,…
- codewords-clientA Python client library for the Codewords API with built-in FastAPI…
Give your agent the search over MCP, or paste the wish link into any chat.
More Security packages
Provides Python bindings to the FreeDesktop.org Secret Service API for securely storing and retrieving passwords and secrets through GNOME Keyring, KWallet, or KeePassXC.
MSAL for Python handles OAuth2 and OpenID Connect authentication with Microsoft identity services, managing token acquisition, caching, and refresh for applications integrating with Microsoft Entra ID, Microsoft Accounts, and Azure AD B2C.
joserfc implements JOSE standards (JWS, JWE, JWK, JWT, and related RFCs) for signing, encrypting, and managing JSON-based cryptographic tokens in Python.
Authlib provides a complete implementation of OAuth 1.0, OAuth 2.0, and OpenID Connect 1.0 for building both authentication clients and servers, with built-in support for JWS, JWK, JWA, and JWT standards.
Provides low-level CFFI bindings to the official Argon2 password hashing algorithm for use by libraries and applications that need direct access to Argon2 without higher-level abstractions.
ADAL for Python authenticates applications with Azure Active Directory to obtain tokens for accessing Azure AD-protected resources.
Install only if maintaining existing code that already depends on it, and plan a migration.
See also ggshield · pybacklogpy · detect-secrets · bc-detect-secrets · truffleHog · kingfisher-bin · safety · uv-secure · guarddog · vt-py