evergreen-py is a Python client library for interacting with the Evergreen API, specifically supporting its V2 version. It allows developers to build Python tools for Evergreen or use it on the command line to retrieve data about Evergreen objects. The library is actively maintained with automatic deployments to PyPI on merges to the master branch, following a semver versioning scheme. The current version is 3.15.0.
pip install evergreen-pyVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to authenticate with the Evergreen API and fetch a project by its ID. It's crucial to provide your Evergreen username and API key, ideally via environment variables, or through an `.evergreen.yml` file.
Ensure `EVERGREEN_USERNAME` and `EVERGREEN_API_KEY` are set in your environment, or configure an `.evergreen.yml` file in your home directory or current working directory with your credentials.
If you intend to use `patch_from_diff`, you must manually download and install the Evergreen CLI client for your operating system from the Evergreen website (e.g., `https://evergreen.mongodb.com/clients/linux_amd64/evergreen`) and ensure it's accessible in your PATH.
Refer to the Evergreen REST V2 Usage documentation for supported API capabilities and ensure your interactions align with V2 specifications.
Ensure the library is installed using pip: `pip install evergreen-py` and that your Python script is run within the correct environment.
Set the `EVERGREEN_USERNAME` and `EVERGREEN_API_KEY` environment variables, or create a valid `.evergreen.yml` file in your home or working directory with your Evergreen credentials.
Consult the `evergreen-py` documentation or the Evergreen REST V2 API documentation to confirm the correct method or attribute name and its availability. Double-check for typos.
Manually download and install the Evergreen CLI client for your operating system from the Evergreen website (e.g., `https://evergreen.mongodb.com/clients/linux_amd64/evergreen`) and ensure its executable is added to your system's PATH.