workflowforge


Nameworkflowforge JSON
Version 1.1.2 PyPI version JSON
download
home_pageNone
SummaryA robust and flexible library for creating GitHub Actions workflows, Jenkins pipelines, and AWS CodeBuild BuildSpecs programmatically in Python
upload_time2025-08-30 22:18:41
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseMIT
keywords github-actions jenkins codebuild aws workflow ci-cd automation yaml devops pipeline buildspec
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # WorkflowForge πŸ”¨

## πŸ“Š Project Status

[![License: MIT][license-badge]][license-url]
[![PyPI version][pypi-badge]][pypi-url]
[![Downloads][pepy-badge]][pepy-url]
[![Test PyPI][testpypi-badge]][testpypi-url]
[![Python Versions][python-versions-badge]][python-versions-url]
[![Tests][tests-badge]][tests-url]
[![pre-commit.ci status][precommit-badge]][precommit-url]
[![Ruff][ruff-badge]][ruff-url]
[![Security][security-badge]][security-url]
[![Maintained by Brainy Nimbus][maintained-badge]][maintained-url]

A robust and flexible library for creating GitHub Actions workflows, Azure DevOps pipelines, Jenkins pipelines, and AWS CodeBuild BuildSpecs programmatically in Python.

## ✨ Features

- **Intuitive API**: Fluent and easy-to-use syntax
- **Type Validation**: Built on Pydantic for automatic validation
- **IDE Support**: Full autocompletion with type hints
- **Type Safety**: Complete mypy compliance with strict type checking
- **Multi-Platform**: GitHub Actions, Azure DevOps, Jenkins, AWS CodeBuild
- **Pipeline Visualization**: Automatic diagram generation with Graphviz
- **Secrets Support**: Secure credential handling across all platforms
- **Templates**: Pre-built workflows for common use cases
- **Validation**: Schema validation and best practices checking
- **Optional Security Scan**: On-demand Checkov scan for generated workflows (GitHub Actions and Azure)
- **Optional AI Documentation**: AI-powered README generation with OllamaPipelines)

## πŸš€ Installation

```bash
pip install workflowforge
```

## πŸ“š Examples

Check out the `examples/` directory for complete working examples:

```bash

# Run individual examples
python examples/github_actions/basic_ci.py
python examples/jenkins/maven_build.py
python examples/codebuild/node_app.py
python examples/azure_devops/hello_world.py
python examples/azure_devops/python_ci.py
```

This will generate actual pipeline files and diagrams using the new import structure.

## πŸ€– AI Documentation (Optional)

WorkflowForge can automatically generate comprehensive README documentation for your workflows using **Ollama** (free local AI):

```bash
# Install Ollama (one-time setup)
curl -fsSL https://ollama.com/install.sh | sh
ollama serve
ollama pull llama3.2
```

```python
# Generate workflow with AI documentation and diagram
workflow.save(".github/workflows/ci.yml", generate_readme=True, use_ai=True, generate_diagram=True)
# Creates: ci.yml + ci_README.md + CI_Pipeline_workflow.png

# Or generate README separately
readme = workflow.generate_readme(use_ai=True, ai_model="llama3.2")
print(readme)
```

**Features:**

- βœ… **Completely free** - no API keys or cloud services
- βœ… **Works offline** - local AI processing
- βœ… **Optional** - gracefully falls back to templates if Ollama not available
- βœ… **Comprehensive** - explains purpose, triggers, jobs, secrets, setup instructions
- βœ… **All platforms** - GitHub Actions, Azure DevOps, Jenkins, AWS CodeBuild

## πŸ“Š Pipeline Visualization (Automatic)

WorkflowForge automatically generates visual diagrams of your pipelines using **Graphviz**:

```bash
# Install Graphviz (one-time setup)
brew install graphviz          # macOS
sudo apt-get install graphviz  # Ubuntu
choco install graphviz         # Windows
```

```python
# Generate workflow with automatic diagram
workflow.save(".github/workflows/ci.yml", generate_diagram=True)
# Creates: ci.yml + CI_Pipeline_workflow.png

# Generate diagram separately
diagram_path = workflow.generate_diagram("png")
print(f"πŸ“Š Diagram saved: {diagram_path}")

# Multiple formats supported
workflow.generate_diagram("svg")  # Vector graphics
workflow.generate_diagram("pdf")  # PDF document
```

**Features:**

- βœ… **Automatic generation** - every pipeline gets a visual diagram
- βœ… **Multiple formats** - PNG, SVG, PDF, DOT
- βœ… **Smart fallback** - DOT files if Graphviz not installed
- βœ… **Platform-specific styling** - Azure DevOps (blue), GitHub (purple), Jenkins (orange), CodeBuild (toasted AWS yellow)
- βœ… **Comprehensive view** - shows triggers, jobs, dependencies, step counts

## πŸ“– Basic Usage

### GitHub Actions Usage

```python
from workflowforge import github_actions

# Create workflow using snake_case functions
workflow = github_actions.workflow(
    name="My Workflow",
    on=github_actions.on_push(branches=["main"])
)

# Create job
job = github_actions.job(runs_on="ubuntu-latest")
job.add_step(github_actions.action("actions/checkout@v4", name="Checkout"))
job.add_step(github_actions.run("echo 'Hello World!'", name="Say Hello"))

# Add job to workflow
workflow.add_job("hello", job)

# Generate YAML
print(workflow.to_yaml())

# Save with documentation and diagram
workflow.save(".github/workflows/hello.yml", generate_readme=True, generate_diagram=True)
# Creates: hello.yml + hello_README.md + My_Workflow.png
```

### Jenkins Pipeline Usage

```python
from workflowforge import jenkins_platform

# Create Jenkins pipeline using snake_case
pipeline = jenkins_platform.pipeline()
pipeline.set_agent(jenkins_platform.agent_docker("maven:3.9.3-eclipse-temurin-17"))

# Add stages
build_stage = jenkins_platform.stage("Build")
build_stage.add_step("mvn clean compile")
pipeline.add_stage(build_stage)

# Generate Jenkinsfile with diagram
pipeline.save("Jenkinsfile", generate_diagram=True)
# Creates: Jenkinsfile + jenkins_pipeline.png
```

### AWS CodeBuild BuildSpec Usage

```python
from workflowforge import aws_codebuild

# Create BuildSpec using snake_case
spec = aws_codebuild.buildspec()

# Add environment
env = aws_codebuild.environment()
env.add_variable("JAVA_HOME", "/usr/lib/jvm/java-17-openjdk")
spec.set_env(env)

# Add build phase
build_phase = aws_codebuild.phase()
build_phase.add_command("mvn clean package")
spec.set_build_phase(build_phase)

# Set artifacts
artifacts_obj = aws_codebuild.artifacts(["target/*.jar"])
spec.set_artifacts(artifacts_obj)

# Generate buildspec.yml with AI documentation and diagram
spec.save("buildspec.yml", generate_readme=True, use_ai=True, generate_diagram=True)
# Creates: buildspec.yml + buildspec_README.md + codebuild_spec.png
```

### Azure DevOps Usage

Generate a simple β€œhello” pipeline:

```python
from workflowforge import azure_devops as ado

pipeline = ado.hello_world_template_azure(
    name="Hello ADO",
    message="Hello Azure DevOps from WorkflowForge!",
)
pipeline.save("azure-pipelines.yml")
```

Or generate a Python matrix CI with caching across Ubuntu/Windows/macOS:

```python
from workflowforge import azure_devops as ado

pipeline = ado.python_ci_template_azure(
    python_versions=["3.11", "3.12", "3.13"],
    os_list=["ubuntu-latest", "windows-latest", "macOS-latest"],
    use_cache=True,
)
pipeline.save("azure-pipelines.yml")
```

Optionally, scan the emitted YAML with Checkov (if installed):

```python
from workflowforge import azure_devops as ado

pipeline = ado.python_ci_template_azure()
pipeline.save("azure-pipelines.yml", scan_with_checkov=True)
```

See also: `examples/azure_devops/python_ci_scan.py`.

### AI Documentation Examples

```python
# GitHub Actions with AI README
workflow = Workflow(name="CI Pipeline", on=on_push())
job = Job(runs_on="ubuntu-latest")
job.add_step(action("actions/checkout@v4"))
workflow.add_job("test", job)

# Save with AI documentation and diagram
workflow.save("ci.yml", generate_readme=True, use_ai=True, generate_diagram=True)
# Creates: ci.yml + ci_README.md + Test_Workflow.png

# Jenkins with AI README and diagram
pipeline = pipeline()
stage_build = stage("Build")
stage_build.add_step("mvn clean package")
pipeline.add_stage(stage_build)

# Save with AI documentation and diagram
pipeline.save("Jenkinsfile", generate_readme=True, use_ai=True, generate_diagram=True)
# Creates: Jenkinsfile + Jenkinsfile_README.md + jenkins_pipeline.png

# Check AI availability
from workflowforge import OllamaClient
client = OllamaClient()
if client.is_available():
    print("AI documentation available!")
else:
    print("Using template documentation (Ollama not running)")
```

## Modular Import Structure

WorkflowForge supports **platform-specific imports** with **snake_case naming** following Python conventions:

### Platform Modules

```python
# Import specific platforms
from workflowforge import github_actions, jenkins_platform, aws_codebuild, azure_devops

# Or use short aliases
from workflowforge import github_actions as gh
from workflowforge import jenkins_platform as jenkins
from workflowforge import aws_codebuild as cb
from workflowforge import azure_devops as ado
```

### Benefits

βœ… **Platform separation** - Clear namespace for each platform
βœ… **Snake case naming** - Follows Python PEP 8 conventions
βœ… **IDE autocompletion** - Better IntelliSense support
βœ… **Shorter code** - `gh.action()` vs `github_actions.action()`

## πŸ”§ Advanced Examples

### Build Matrix Workflow

```python
from workflowforge import github_actions as gh

job = gh.job(
    runs_on="ubuntu-latest",
    strategy=gh.strategy(
        matrix=gh.matrix(
            python_version=["3.11", "3.12", "3.13"],
            os=["ubuntu-latest", "windows-latest"]
        )
    )
)
```

### Multiple Triggers

```python
from workflowforge import github_actions as gh

workflow = gh.workflow(
    name="CI/CD",
    on=[
        gh.on_push(branches=["main"]),
        gh.on_pull_request(branches=["main"]),
        gh.on_schedule("0 2 * * *")  # Daily at 2 AM
    ]
)
```

### Jobs with Dependencies

```python
from workflowforge import github_actions as gh

test_job = gh.job(runs_on="ubuntu-latest")
deploy_job = gh.job(runs_on="ubuntu-latest")
deploy_job.needs = "test"

workflow = gh.workflow(name="CI/CD")
workflow.add_job("test", test_job)
workflow.add_job("deploy", deploy_job)
```

## πŸ“š Complete Documentation

### Platform Support

**GitHub Actions:**

- `on_push()`, `on_pull_request()`, `on_schedule()`, `on_workflow_dispatch()`
- `action()`, `run()` steps
- `secret()`, `variable()`, `github_context()` for credentials
- Build matrices, strategies, environments
- Optional Checkov scan: `workflow.save(path, scan_with_checkov=True)`

**Jenkins:**

- `pipeline()`, `stage()`, `agent_docker()`, `agent_any()`
- `jenkins_credential()`, `jenkins_env()`, `jenkins_param()`
- Shared libraries, parameters, post actions

**AWS CodeBuild:**

- `buildspec()`, `phase()`, `environment()`, `artifacts()`
- `codebuild_secret()`, `codebuild_parameter()`, `codebuild_env()`
- Runtime versions, caching, reports

**Azure DevOps:**

- `pipeline()`, `job()`, `strategy(matrix=...)`, `task()`, `script()`
- Build matrices, multi-OS matrix, and pip caching
- Hello world template
- Optional Checkov scan: `pipeline.save(path, scan_with_checkov=True)`

### AI Documentation

- **Ollama Integration**: Local AI models (llama3.2, codellama, qwen2.5-coder)
- **Automatic README**: Explains workflow purpose, triggers, jobs, setup
- **Fallback Support**: Template-based documentation if AI unavailable
- **All Platforms**: Works with GitHub Actions, Azure DevOps, Jenkins, CodeBuild

### Pipeline Visualization

- **Graphviz Integration**: Native diagram generation using DOT language
- **Multiple Formats**: PNG, SVG, PDF, DOT files
- **Platform Styling**: Color-coded diagrams (Azure DevOps: blue, GitHub: purple, Jenkins: orange, CodeBuild: toasted AWS yellow)
- **Smart Fallback**: DOT files if Graphviz not installed, images if available
- **Comprehensive View**: Shows triggers, jobs, dependencies, step counts, execution flow

## 🀝 Contributing

Contributions are welcome! Please:

1. Fork the repository
1. Create a feature branch
1. Add tests
1. Submit a pull request

## πŸ‘¨β€πŸ’» Author & Maintainer

**Brainy Nimbus, LLC** - We love opensource! πŸ’–

Website: [brainynimbus.io](https://brainynimbus.io)
Email: <info@brainynimbus.io>
GitHub: [@brainynimbus](https://github.com/brainynimbus)

## πŸ“„ License

MIT License - see [LICENSE](LICENSE) for details.

## πŸ”— Links

**GitHub Actions:**

- [GitHub Actions Documentation](https://docs.github.com/en/actions)
- [Actions Marketplace](https://github.com/marketplace?type=actions)
- [Workflow Syntax](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions)

**Jenkins:**

- [Jenkins Documentation](https://www.jenkins.io/doc/)
- [Pipeline Syntax](https://www.jenkins.io/doc/book/pipeline/syntax/)
- [Jenkins Plugins](https://plugins.jenkins.io/)

**AWS CodeBuild:**

- [CodeBuild Documentation](https://docs.aws.amazon.com/codebuild/)
- [BuildSpec Reference](https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html)
- [CodeBuild Samples](https://docs.aws.amazon.com/codebuild/latest/userguide/samples.html)

**Azure DevOps Pipelines:**

- [YAML schema reference](https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema)
- [Customize Python pipelines](https://learn.microsoft.com/en-us/azure/devops/pipelines/ecosystems/customize-python)

[license-badge]: https://img.shields.io/badge/License-MIT-yellow.svg
[license-url]: https://opensource.org/licenses/MIT
[maintained-badge]: https://img.shields.io/badge/maintained%20by-Brainy%20Nimbus-8A2BE2?style=flat
[maintained-url]: https://brainynimbus.io/
[pepy-badge]: https://static.pepy.tech/badge/workflowforge
[pepy-url]: https://pepy.tech/project/workflowforge
[precommit-badge]: https://results.pre-commit.ci/badge/github/brainynimbus/workflowforge/main.svg
[precommit-url]: https://results.pre-commit.ci/latest/github/brainynimbus/workflowforge/main
[pypi-badge]: https://badge.fury.io/py/workflowforge.svg
[pypi-url]: https://badge.fury.io/py/workflowforge
[python-versions-badge]: https://img.shields.io/badge/python-3.11%20%7C%203.12%20%7C%203.13-blue
[python-versions-url]: https://www.python.org/
[ruff-badge]: https://img.shields.io/badge/linting-ruff-46A3FF?logo=ruff&logoColor=white
[ruff-url]: https://github.com/astral-sh/ruff
[security-badge]: https://img.shields.io/badge/security-bandit-brightgreen?style=flat
[security-url]: https://bandit.readthedocs.io/
[testpypi-badge]: https://img.shields.io/badge/Test%20PyPI-published-green
[testpypi-url]: https://test.pypi.org/project/workflowforge/
[tests-badge]: https://github.com/brainynimbus/workflowforge/workflows/Publish%20WorkflowForge%20to%20PyPI/badge.svg
[tests-url]: https://github.com/brainynimbus/workflowforge/actions

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "workflowforge",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "github-actions, jenkins, codebuild, aws, workflow, ci-cd, automation, yaml, devops, pipeline, buildspec",
    "author": null,
    "author_email": "\"Brainy Nimbus, LLC\" <info@brainynimbus.io>",
    "download_url": "https://files.pythonhosted.org/packages/5f/14/fcdcf707314d42e74ff45c4a70662a611bdf061239afb23df097a8125769/workflowforge-1.1.2.tar.gz",
    "platform": null,
    "description": "# WorkflowForge \ud83d\udd28\n\n## \ud83d\udcca Project Status\n\n[![License: MIT][license-badge]][license-url]\n[![PyPI version][pypi-badge]][pypi-url]\n[![Downloads][pepy-badge]][pepy-url]\n[![Test PyPI][testpypi-badge]][testpypi-url]\n[![Python Versions][python-versions-badge]][python-versions-url]\n[![Tests][tests-badge]][tests-url]\n[![pre-commit.ci status][precommit-badge]][precommit-url]\n[![Ruff][ruff-badge]][ruff-url]\n[![Security][security-badge]][security-url]\n[![Maintained by Brainy Nimbus][maintained-badge]][maintained-url]\n\nA robust and flexible library for creating GitHub Actions workflows, Azure DevOps pipelines, Jenkins pipelines, and AWS CodeBuild BuildSpecs programmatically in Python.\n\n## \u2728 Features\n\n- **Intuitive API**: Fluent and easy-to-use syntax\n- **Type Validation**: Built on Pydantic for automatic validation\n- **IDE Support**: Full autocompletion with type hints\n- **Type Safety**: Complete mypy compliance with strict type checking\n- **Multi-Platform**: GitHub Actions, Azure DevOps, Jenkins, AWS CodeBuild\n- **Pipeline Visualization**: Automatic diagram generation with Graphviz\n- **Secrets Support**: Secure credential handling across all platforms\n- **Templates**: Pre-built workflows for common use cases\n- **Validation**: Schema validation and best practices checking\n- **Optional Security Scan**: On-demand Checkov scan for generated workflows (GitHub Actions and Azure)\n- **Optional AI Documentation**: AI-powered README generation with OllamaPipelines)\n\n## \ud83d\ude80 Installation\n\n```bash\npip install workflowforge\n```\n\n## \ud83d\udcda Examples\n\nCheck out the `examples/` directory for complete working examples:\n\n```bash\n\n# Run individual examples\npython examples/github_actions/basic_ci.py\npython examples/jenkins/maven_build.py\npython examples/codebuild/node_app.py\npython examples/azure_devops/hello_world.py\npython examples/azure_devops/python_ci.py\n```\n\nThis will generate actual pipeline files and diagrams using the new import structure.\n\n## \ud83e\udd16 AI Documentation (Optional)\n\nWorkflowForge can automatically generate comprehensive README documentation for your workflows using **Ollama** (free local AI):\n\n```bash\n# Install Ollama (one-time setup)\ncurl -fsSL https://ollama.com/install.sh | sh\nollama serve\nollama pull llama3.2\n```\n\n```python\n# Generate workflow with AI documentation and diagram\nworkflow.save(\".github/workflows/ci.yml\", generate_readme=True, use_ai=True, generate_diagram=True)\n# Creates: ci.yml + ci_README.md + CI_Pipeline_workflow.png\n\n# Or generate README separately\nreadme = workflow.generate_readme(use_ai=True, ai_model=\"llama3.2\")\nprint(readme)\n```\n\n**Features:**\n\n- \u2705 **Completely free** - no API keys or cloud services\n- \u2705 **Works offline** - local AI processing\n- \u2705 **Optional** - gracefully falls back to templates if Ollama not available\n- \u2705 **Comprehensive** - explains purpose, triggers, jobs, secrets, setup instructions\n- \u2705 **All platforms** - GitHub Actions, Azure DevOps, Jenkins, AWS CodeBuild\n\n## \ud83d\udcca Pipeline Visualization (Automatic)\n\nWorkflowForge automatically generates visual diagrams of your pipelines using **Graphviz**:\n\n```bash\n# Install Graphviz (one-time setup)\nbrew install graphviz          # macOS\nsudo apt-get install graphviz  # Ubuntu\nchoco install graphviz         # Windows\n```\n\n```python\n# Generate workflow with automatic diagram\nworkflow.save(\".github/workflows/ci.yml\", generate_diagram=True)\n# Creates: ci.yml + CI_Pipeline_workflow.png\n\n# Generate diagram separately\ndiagram_path = workflow.generate_diagram(\"png\")\nprint(f\"\ud83d\udcca Diagram saved: {diagram_path}\")\n\n# Multiple formats supported\nworkflow.generate_diagram(\"svg\")  # Vector graphics\nworkflow.generate_diagram(\"pdf\")  # PDF document\n```\n\n**Features:**\n\n- \u2705 **Automatic generation** - every pipeline gets a visual diagram\n- \u2705 **Multiple formats** - PNG, SVG, PDF, DOT\n- \u2705 **Smart fallback** - DOT files if Graphviz not installed\n- \u2705 **Platform-specific styling** - Azure DevOps (blue), GitHub (purple), Jenkins (orange), CodeBuild (toasted AWS yellow)\n- \u2705 **Comprehensive view** - shows triggers, jobs, dependencies, step counts\n\n## \ud83d\udcd6 Basic Usage\n\n### GitHub Actions Usage\n\n```python\nfrom workflowforge import github_actions\n\n# Create workflow using snake_case functions\nworkflow = github_actions.workflow(\n    name=\"My Workflow\",\n    on=github_actions.on_push(branches=[\"main\"])\n)\n\n# Create job\njob = github_actions.job(runs_on=\"ubuntu-latest\")\njob.add_step(github_actions.action(\"actions/checkout@v4\", name=\"Checkout\"))\njob.add_step(github_actions.run(\"echo 'Hello World!'\", name=\"Say Hello\"))\n\n# Add job to workflow\nworkflow.add_job(\"hello\", job)\n\n# Generate YAML\nprint(workflow.to_yaml())\n\n# Save with documentation and diagram\nworkflow.save(\".github/workflows/hello.yml\", generate_readme=True, generate_diagram=True)\n# Creates: hello.yml + hello_README.md + My_Workflow.png\n```\n\n### Jenkins Pipeline Usage\n\n```python\nfrom workflowforge import jenkins_platform\n\n# Create Jenkins pipeline using snake_case\npipeline = jenkins_platform.pipeline()\npipeline.set_agent(jenkins_platform.agent_docker(\"maven:3.9.3-eclipse-temurin-17\"))\n\n# Add stages\nbuild_stage = jenkins_platform.stage(\"Build\")\nbuild_stage.add_step(\"mvn clean compile\")\npipeline.add_stage(build_stage)\n\n# Generate Jenkinsfile with diagram\npipeline.save(\"Jenkinsfile\", generate_diagram=True)\n# Creates: Jenkinsfile + jenkins_pipeline.png\n```\n\n### AWS CodeBuild BuildSpec Usage\n\n```python\nfrom workflowforge import aws_codebuild\n\n# Create BuildSpec using snake_case\nspec = aws_codebuild.buildspec()\n\n# Add environment\nenv = aws_codebuild.environment()\nenv.add_variable(\"JAVA_HOME\", \"/usr/lib/jvm/java-17-openjdk\")\nspec.set_env(env)\n\n# Add build phase\nbuild_phase = aws_codebuild.phase()\nbuild_phase.add_command(\"mvn clean package\")\nspec.set_build_phase(build_phase)\n\n# Set artifacts\nartifacts_obj = aws_codebuild.artifacts([\"target/*.jar\"])\nspec.set_artifacts(artifacts_obj)\n\n# Generate buildspec.yml with AI documentation and diagram\nspec.save(\"buildspec.yml\", generate_readme=True, use_ai=True, generate_diagram=True)\n# Creates: buildspec.yml + buildspec_README.md + codebuild_spec.png\n```\n\n### Azure DevOps Usage\n\nGenerate a simple \u201chello\u201d pipeline:\n\n```python\nfrom workflowforge import azure_devops as ado\n\npipeline = ado.hello_world_template_azure(\n    name=\"Hello ADO\",\n    message=\"Hello Azure DevOps from WorkflowForge!\",\n)\npipeline.save(\"azure-pipelines.yml\")\n```\n\nOr generate a Python matrix CI with caching across Ubuntu/Windows/macOS:\n\n```python\nfrom workflowforge import azure_devops as ado\n\npipeline = ado.python_ci_template_azure(\n    python_versions=[\"3.11\", \"3.12\", \"3.13\"],\n    os_list=[\"ubuntu-latest\", \"windows-latest\", \"macOS-latest\"],\n    use_cache=True,\n)\npipeline.save(\"azure-pipelines.yml\")\n```\n\nOptionally, scan the emitted YAML with Checkov (if installed):\n\n```python\nfrom workflowforge import azure_devops as ado\n\npipeline = ado.python_ci_template_azure()\npipeline.save(\"azure-pipelines.yml\", scan_with_checkov=True)\n```\n\nSee also: `examples/azure_devops/python_ci_scan.py`.\n\n### AI Documentation Examples\n\n```python\n# GitHub Actions with AI README\nworkflow = Workflow(name=\"CI Pipeline\", on=on_push())\njob = Job(runs_on=\"ubuntu-latest\")\njob.add_step(action(\"actions/checkout@v4\"))\nworkflow.add_job(\"test\", job)\n\n# Save with AI documentation and diagram\nworkflow.save(\"ci.yml\", generate_readme=True, use_ai=True, generate_diagram=True)\n# Creates: ci.yml + ci_README.md + Test_Workflow.png\n\n# Jenkins with AI README and diagram\npipeline = pipeline()\nstage_build = stage(\"Build\")\nstage_build.add_step(\"mvn clean package\")\npipeline.add_stage(stage_build)\n\n# Save with AI documentation and diagram\npipeline.save(\"Jenkinsfile\", generate_readme=True, use_ai=True, generate_diagram=True)\n# Creates: Jenkinsfile + Jenkinsfile_README.md + jenkins_pipeline.png\n\n# Check AI availability\nfrom workflowforge import OllamaClient\nclient = OllamaClient()\nif client.is_available():\n    print(\"AI documentation available!\")\nelse:\n    print(\"Using template documentation (Ollama not running)\")\n```\n\n## Modular Import Structure\n\nWorkflowForge supports **platform-specific imports** with **snake_case naming** following Python conventions:\n\n### Platform Modules\n\n```python\n# Import specific platforms\nfrom workflowforge import github_actions, jenkins_platform, aws_codebuild, azure_devops\n\n# Or use short aliases\nfrom workflowforge import github_actions as gh\nfrom workflowforge import jenkins_platform as jenkins\nfrom workflowforge import aws_codebuild as cb\nfrom workflowforge import azure_devops as ado\n```\n\n### Benefits\n\n\u2705 **Platform separation** - Clear namespace for each platform\n\u2705 **Snake case naming** - Follows Python PEP 8 conventions\n\u2705 **IDE autocompletion** - Better IntelliSense support\n\u2705 **Shorter code** - `gh.action()` vs `github_actions.action()`\n\n## \ud83d\udd27 Advanced Examples\n\n### Build Matrix Workflow\n\n```python\nfrom workflowforge import github_actions as gh\n\njob = gh.job(\n    runs_on=\"ubuntu-latest\",\n    strategy=gh.strategy(\n        matrix=gh.matrix(\n            python_version=[\"3.11\", \"3.12\", \"3.13\"],\n            os=[\"ubuntu-latest\", \"windows-latest\"]\n        )\n    )\n)\n```\n\n### Multiple Triggers\n\n```python\nfrom workflowforge import github_actions as gh\n\nworkflow = gh.workflow(\n    name=\"CI/CD\",\n    on=[\n        gh.on_push(branches=[\"main\"]),\n        gh.on_pull_request(branches=[\"main\"]),\n        gh.on_schedule(\"0 2 * * *\")  # Daily at 2 AM\n    ]\n)\n```\n\n### Jobs with Dependencies\n\n```python\nfrom workflowforge import github_actions as gh\n\ntest_job = gh.job(runs_on=\"ubuntu-latest\")\ndeploy_job = gh.job(runs_on=\"ubuntu-latest\")\ndeploy_job.needs = \"test\"\n\nworkflow = gh.workflow(name=\"CI/CD\")\nworkflow.add_job(\"test\", test_job)\nworkflow.add_job(\"deploy\", deploy_job)\n```\n\n## \ud83d\udcda Complete Documentation\n\n### Platform Support\n\n**GitHub Actions:**\n\n- `on_push()`, `on_pull_request()`, `on_schedule()`, `on_workflow_dispatch()`\n- `action()`, `run()` steps\n- `secret()`, `variable()`, `github_context()` for credentials\n- Build matrices, strategies, environments\n- Optional Checkov scan: `workflow.save(path, scan_with_checkov=True)`\n\n**Jenkins:**\n\n- `pipeline()`, `stage()`, `agent_docker()`, `agent_any()`\n- `jenkins_credential()`, `jenkins_env()`, `jenkins_param()`\n- Shared libraries, parameters, post actions\n\n**AWS CodeBuild:**\n\n- `buildspec()`, `phase()`, `environment()`, `artifacts()`\n- `codebuild_secret()`, `codebuild_parameter()`, `codebuild_env()`\n- Runtime versions, caching, reports\n\n**Azure DevOps:**\n\n- `pipeline()`, `job()`, `strategy(matrix=...)`, `task()`, `script()`\n- Build matrices, multi-OS matrix, and pip caching\n- Hello world template\n- Optional Checkov scan: `pipeline.save(path, scan_with_checkov=True)`\n\n### AI Documentation\n\n- **Ollama Integration**: Local AI models (llama3.2, codellama, qwen2.5-coder)\n- **Automatic README**: Explains workflow purpose, triggers, jobs, setup\n- **Fallback Support**: Template-based documentation if AI unavailable\n- **All Platforms**: Works with GitHub Actions, Azure DevOps, Jenkins, CodeBuild\n\n### Pipeline Visualization\n\n- **Graphviz Integration**: Native diagram generation using DOT language\n- **Multiple Formats**: PNG, SVG, PDF, DOT files\n- **Platform Styling**: Color-coded diagrams (Azure DevOps: blue, GitHub: purple, Jenkins: orange, CodeBuild: toasted AWS yellow)\n- **Smart Fallback**: DOT files if Graphviz not installed, images if available\n- **Comprehensive View**: Shows triggers, jobs, dependencies, step counts, execution flow\n\n## \ud83e\udd1d Contributing\n\nContributions are welcome! Please:\n\n1. Fork the repository\n1. Create a feature branch\n1. Add tests\n1. Submit a pull request\n\n## \ud83d\udc68\u200d\ud83d\udcbb Author & Maintainer\n\n**Brainy Nimbus, LLC** - We love opensource! \ud83d\udc96\n\nWebsite: [brainynimbus.io](https://brainynimbus.io)\nEmail: <info@brainynimbus.io>\nGitHub: [@brainynimbus](https://github.com/brainynimbus)\n\n## \ud83d\udcc4 License\n\nMIT License - see [LICENSE](LICENSE) for details.\n\n## \ud83d\udd17 Links\n\n**GitHub Actions:**\n\n- [GitHub Actions Documentation](https://docs.github.com/en/actions)\n- [Actions Marketplace](https://github.com/marketplace?type=actions)\n- [Workflow Syntax](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions)\n\n**Jenkins:**\n\n- [Jenkins Documentation](https://www.jenkins.io/doc/)\n- [Pipeline Syntax](https://www.jenkins.io/doc/book/pipeline/syntax/)\n- [Jenkins Plugins](https://plugins.jenkins.io/)\n\n**AWS CodeBuild:**\n\n- [CodeBuild Documentation](https://docs.aws.amazon.com/codebuild/)\n- [BuildSpec Reference](https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html)\n- [CodeBuild Samples](https://docs.aws.amazon.com/codebuild/latest/userguide/samples.html)\n\n**Azure DevOps Pipelines:**\n\n- [YAML schema reference](https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema)\n- [Customize Python pipelines](https://learn.microsoft.com/en-us/azure/devops/pipelines/ecosystems/customize-python)\n\n[license-badge]: https://img.shields.io/badge/License-MIT-yellow.svg\n[license-url]: https://opensource.org/licenses/MIT\n[maintained-badge]: https://img.shields.io/badge/maintained%20by-Brainy%20Nimbus-8A2BE2?style=flat\n[maintained-url]: https://brainynimbus.io/\n[pepy-badge]: https://static.pepy.tech/badge/workflowforge\n[pepy-url]: https://pepy.tech/project/workflowforge\n[precommit-badge]: https://results.pre-commit.ci/badge/github/brainynimbus/workflowforge/main.svg\n[precommit-url]: https://results.pre-commit.ci/latest/github/brainynimbus/workflowforge/main\n[pypi-badge]: https://badge.fury.io/py/workflowforge.svg\n[pypi-url]: https://badge.fury.io/py/workflowforge\n[python-versions-badge]: https://img.shields.io/badge/python-3.11%20%7C%203.12%20%7C%203.13-blue\n[python-versions-url]: https://www.python.org/\n[ruff-badge]: https://img.shields.io/badge/linting-ruff-46A3FF?logo=ruff&logoColor=white\n[ruff-url]: https://github.com/astral-sh/ruff\n[security-badge]: https://img.shields.io/badge/security-bandit-brightgreen?style=flat\n[security-url]: https://bandit.readthedocs.io/\n[testpypi-badge]: https://img.shields.io/badge/Test%20PyPI-published-green\n[testpypi-url]: https://test.pypi.org/project/workflowforge/\n[tests-badge]: https://github.com/brainynimbus/workflowforge/workflows/Publish%20WorkflowForge%20to%20PyPI/badge.svg\n[tests-url]: https://github.com/brainynimbus/workflowforge/actions\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A robust and flexible library for creating GitHub Actions workflows, Jenkins pipelines, and AWS CodeBuild BuildSpecs programmatically in Python",
    "version": "1.1.2",
    "project_urls": {
        "Documentation": "https://workflowforge.brainynimbus.io",
        "Homepage": "https://brainynimbus.io/workflowforge",
        "Issues": "https://github.com/brainynimbus/workflowforge/issues",
        "Repository": "https://github.com/brainynimbus/workflowforge"
    },
    "split_keywords": [
        "github-actions",
        " jenkins",
        " codebuild",
        " aws",
        " workflow",
        " ci-cd",
        " automation",
        " yaml",
        " devops",
        " pipeline",
        " buildspec"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c5d93e4e45c9674b6c6e3a7ba39f8ff86cea00cf7d56ca023c80bca4f563e4d3",
                "md5": "ddd56b351f7d0536a39555af4dcc7e6b",
                "sha256": "2b181ebeb08f0114bf3f94f7c8491a44deeb97f470f926eb44b2b849138af9a4"
            },
            "downloads": -1,
            "filename": "workflowforge-1.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ddd56b351f7d0536a39555af4dcc7e6b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 35133,
            "upload_time": "2025-08-30T22:18:40",
            "upload_time_iso_8601": "2025-08-30T22:18:40.371673Z",
            "url": "https://files.pythonhosted.org/packages/c5/d9/3e4e45c9674b6c6e3a7ba39f8ff86cea00cf7d56ca023c80bca4f563e4d3/workflowforge-1.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "5f14fcdcf707314d42e74ff45c4a70662a611bdf061239afb23df097a8125769",
                "md5": "e6abec1836b8e218664887fe106e7c4b",
                "sha256": "fa275676eb857c556cc814920f7ea9773ae71f8c62d25d9e7794def8beacb1c1"
            },
            "downloads": -1,
            "filename": "workflowforge-1.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "e6abec1836b8e218664887fe106e7c4b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 47734,
            "upload_time": "2025-08-30T22:18:41",
            "upload_time_iso_8601": "2025-08-30T22:18:41.979489Z",
            "url": "https://files.pythonhosted.org/packages/5f/14/fcdcf707314d42e74ff45c4a70662a611bdf061239afb23df097a8125769/workflowforge-1.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-30 22:18:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "brainynimbus",
    "github_project": "workflowforge",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "workflowforge"
}
        
Elapsed time: 1.12346s