evergreen.py
Python client for the Evergreen API
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 on this page — 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
evergreen-py on PyPI
pip
pip install evergreen-pyuv
uv add evergreen-pypoetry
poetry add evergreen-pyInstalling 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 the current Python release (<3.14,>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 8 — Click, python-dateutil, PyYAML, requests, structlog, pydantic, packaging, PyJWT |
| Maintenance | actively maintained — 46 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,324,580/month — #2,659 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: evergreen_py-3.19.1-py3-none-any.whl
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
shrub.pyProgrammatically generate Evergreen project…
permissive · top 5,000 on PyPI
pygerrit2Pygerrit2 is a client library for interacting…
permissive · top 15,000 on PyPI
assisted-service-clientA Python client library for the OpenShift…
permissive · top 15,000 on PyPI
cycodeCycode is a command-line security scanner that…
permissive · top 15,000 on PyPI
curatorbinPackages the MongoDB Curator tool as a Python…
unclear · top 5,000 on PyPI
dbt-copilot-pythonProvides utility functions for running Django…
unclear · top 15,000 on PyPI
ociPython SDK for Oracle Cloud Infrastructure that…
permissive · top 5,000 on PyPI
stackit-coreProvides core authentication, configuration,…
permissive · top 15,000 on PyPI
qase-api-v2-clientA Python client library for the Qase TestOps…
unclear · top 15,000 on PyPI
prophecy-libsProvides runtime support and helper utilities…
copyleft · top 15,000 on PyPI