--- id: evergreen-py version: "3.19.1" license: Apache-2.0 license_treatment: permissive maintenance: active --- # evergreen.py — Python client for the Evergreen API License: permissive · Maintenance: active · Downloads: 3.3M/mo ## What it is and what it does Evergreen.py is a Python client library for interacting with MongoDB's Evergreen continuous integration platform via its V2 REST API. It provides both a programmatic interface for Python applications and a command-line tool (evg-api) for quick queries. The library wraps HTTP requests to Evergreen using standard dependencies like requests, pydantic for data validation, and PyJWT for authentication, allowing developers to fetch and manipulate build, test, host, and project data without writing raw API calls. The package is designed for two main workflows: embedding Evergreen queries into Python automation scripts and ad-hoc command-line inspection of infrastructure state. It handles authentication via username and API key, parses JSON responses into typed Python objects, and exposes a fluent query interface. Most operations are straightforward HTTP calls, though some advanced features (like patch_from_diff) require external tooling. Use it for: - Query build and test status for a project to integrate Evergreen data into dashboards or alerts. - Automate task scheduling or host provisioning by scripting Evergreen API calls from Python. - Inspect host inventory, distro configuration, and task history via the command-line tool. - Embed Evergreen queries into CI/CD pipelines to make decisions based on build state. - Generate reports on test failures, task durations, or infrastructure utilization. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A Python client library for the Evergreen API (V2) that enables programmatic and command-line access to Evergreen build and test infrastructure objects. Yes, if you work with Evergreen infrastructure. The package is actively maintained, has low install friction, carries a permissive license, and provides a well-structured interface to a specialized API. Install it if you need to automate or query Evergreen from Python; skip it if you don't use Evergreen. ## Install pip install evergreen-py uv add evergreen-py poetry add evergreen-py ## Installing evergreen.py Before you install: Low install friction with a pure-wheel distribution and eight well-established runtime dependencies. Actively maintained with a recent release (46 days old) and ongoing repository activity. License in practice: Licensed under Apache-2.0 (permissive), allowing free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects. Quickstart: pip install evergreen.py from evergreen.api import EvgAuth, EvergreenApi api = EvergreenApi.get_api(EvgAuth('username', 'api_key')) project = api.project_by_id('mongodb-mongo-master') print(project.display_name) Requires Python 3.9–3.13; the patch_from_diff API requires the Evergreen CLI to be installed separately on the host. Verify before relying: - Actual API coverage and completeness relative to the full Evergreen V2 specification. - Performance characteristics and rate-limiting behavior when querying large datasets. - Whether all Evergreen object types are supported or only a subset. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 3.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags evergreen api client python, evergreen ci integration, build infrastructure api, mongodb evergreen client, ci/cd api wrapper, evergreen cli tool, test infrastructure automation, ci-cd, api-client, mongodb [View on SkillFed](https://skillfed.io/packages/evergreen-py) · [View on PyPI](https://pypi.org/project/evergreen-py/)