--- id: shrub-py version: "3.11.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # shrub.py — Library for creating evergreen configurations License: permissive · Maintenance: active · Downloads: 3.0M/mo ## What it is and what it does shrub.py is a Python library for building Evergreen CI project configurations programmatically. Instead of writing YAML or JSON by hand, you define tasks, build variants, and display tasks as Python objects, then generate the final configuration JSON. It wraps the Evergreen project file format with a type-safe, composable API. The library depends on PyYaml, pydantic, croniter, dataclasses, and typing-extensions to provide validation and scheduling support. It supports Python 3.9 through 3.14 and requires Python 3.8.1 or later. The main use case is automating CI/CD configuration generation for projects using MongoDB's Evergreen CI system, particularly when you need to generate many similar tasks or variants programmatically. Use it for: - Generate parallel test tasks with shared dependencies and display them under a single display task - Programmatically create build variants for multiple platforms or configurations from a template - Build task definitions with function calls and parameterized variables without manual JSON editing - Automate CI configuration for projects that need dynamic task generation based on input data ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Programmatically generate Evergreen project configurations in JSON format by building task, variant, and project objects in Python. Yes, if you are using Evergreen CI and need to generate configurations programmatically. The package is actively maintained, has low install friction, carries a permissive license, and has no known vulnerabilities. The low star count and niche use case (Evergreen-specific) mean it is not a general-purpose tool, but it is well-suited for its intended audience. ## Install pip install shrub-py uv add shrub-py poetry add shrub-py ## Installing shrub.py Before you install: Low install friction with a pure-Python wheel and five runtime dependencies. Active maintenance with a recent release (71 days old) and current commit history. License in practice: Apache-2.0 permissive license allows commercial and private use with minimal restrictions. Quickstart: pip install shrub.py from shrub.v3.evg_project import EvgProject from shrub.v3.evg_build_variant import BuildVariant from shrub.v3.evg_task import EvgTask from shrub.v3.shrub_service import ShrubService task = EvgTask(name="test", commands=[]) variant = BuildVariant(name="linux", tasks=[]) project = EvgProject(buildvariants=[variant], tasks=[task]) print(ShrubService.generate_json(project)) Verify before relying: - Whether the package is actively maintained beyond the single recent commit shown, or if development is sporadic - What the low star count (1) indicates about adoption or community engagement ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 3.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags evergreen project config generation, build task definitions programmatically, ci configuration as code, evergreen json builder, task dependency management, display task orchestration, build variant configuration, ci-cd, evergreen, config-generation [View on SkillFed](https://skillfed.io/packages/shrub-py) · [View on PyPI](https://pypi.org/project/shrub-py/)