--- id: pygitguardian version: "1.33.1" license: MIT license_treatment: permissive maintenance: active --- # pygitguardian — Python Wrapper for GitGuardian's API -- Scan security policy breaks everywhere License: permissive · Maintenance: active · Downloads: 391.2K/mo ## 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 above — verify before relying. API client library for GitGuardian's secret detection service, enabling detection of over 200 types of secrets and security vulnerabilities in text content. 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 pip install pygitguardian uv add pygitguardian poetry add pygitguardian ## Installing pygitguardian 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. 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") Requires a valid GitGuardian API key (obtain from dashboard.gitguardian.com). Python 3.8+ required; Python 3.8 support is deprecated. 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_current - Install friction: low - Maintenance: active - Downloads: 391.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags gitguardian api client, secret detection library, secrets scanning python, security vulnerability detection, devsecops api integration, credential leak detection, text content scanning, secrets-detection, devsecops, api-client [View on SkillFed](https://skillfed.io/packages/pygitguardian) · [View on PyPI](https://pypi.org/project/pygitguardian/)