==================
**azdo_pipeline**
==================
Overview
--------
A Python module to call Azure DevOps pipeline and optionally search output.
Prerequisites
-------------
- Python 3.9 or higher.
- Azure DevOps PAT (Personal Access Token) with Builds (read and execute) permissions.
Usage
-----
Installation:
.. code-block:: BASH
pip3 install azdo_pipeline
# or
python3 -m pip install azdo_pipeline
Bash:
.. code-block:: BASH
call_azdo_pipeline \
-t "<pat>" \
-o "<org>" \
-p "<project_id>" \
-l <pipeline_id> \
[-d '<run_parameters>' \]
[-r <run_id> \]
[-g <log_id> \]
[-s "<search_pattern>"]
Example:
.. code-block:: BASH
call_azdo_pipeline \
-t "sd354sd36f5sf4s6v4s" \
-o "my-org" \
-p "asfj-349859njnkfv-dvdf-3rfsw" \
-l 35 \
-d '{"templateParameters": {"agentPool": "ubuntu-latest"}}' \
-r 3210 \
-g 6 \
-s ".*SUCCESSFUL.*"
Retrieving pipeline run logs list...
Retrieving pipeline run log 9...
Extracting output from logs...
{ 'data': '2025-08-23T08:07:29.0226728Z SUCCESSFUL',
'run_id': 3210,
'status': 200}
Arguments
---------
- -t PAT (Personal Access Token) for Azure DevOps authentication.
- -o Organization name in Azure DevOps.
- -p Project ID or name in Azure DevOps.
- -l Pipeline ID in Azure DevOps.
- -d (Optional) JSON string with run parameters.
- -r (Optional) Specific run ID to fetch logs from.
- -g (Optional) Specific log ID to fetch.
- -s (Optional) Regex pattern to search for in the logs.
Return Value
------------
A dictionary with the following keys:
- data: The matched log line or an empty string if no match is found.
- run_id: The ID of the pipeline run.
- status: The HTTP status code of the API response.
Raw data
{
"_id": null,
"home_page": "https://gitlab.com/fer1035_python/modules/pypi-azdo_pipeline",
"name": "azdo_pipeline",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "Azure, DevOps, pipelines, API, search",
"author": "Ahmad Ferdaus Abd Razak",
"author_email": "fer1035@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/d9/2e/b429424f1a9a778bcef1298926040d78fd2487d77b3f578d594c92e2dea0/azdo_pipeline-1.0.2.tar.gz",
"platform": null,
"description": "==================\n**azdo_pipeline**\n==================\n\nOverview\n--------\n\nA Python module to call Azure DevOps pipeline and optionally search output.\n\nPrerequisites\n-------------\n\n- Python 3.9 or higher.\n- Azure DevOps PAT (Personal Access Token) with Builds (read and execute) permissions.\n\nUsage\n-----\n\nInstallation:\n\n.. code-block:: BASH\n\n pip3 install azdo_pipeline\n # or\n python3 -m pip install azdo_pipeline\n\nBash:\n\n.. code-block:: BASH\n\n call_azdo_pipeline \\\n -t \"<pat>\" \\\n -o \"<org>\" \\\n -p \"<project_id>\" \\\n -l <pipeline_id> \\\n [-d '<run_parameters>' \\]\n [-r <run_id> \\]\n [-g <log_id> \\]\n [-s \"<search_pattern>\"]\n\nExample:\n\n.. code-block:: BASH\n\n call_azdo_pipeline \\\n -t \"sd354sd36f5sf4s6v4s\" \\\n -o \"my-org\" \\\n -p \"asfj-349859njnkfv-dvdf-3rfsw\" \\\n -l 35 \\\n -d '{\"templateParameters\": {\"agentPool\": \"ubuntu-latest\"}}' \\\n -r 3210 \\\n -g 6 \\\n -s \".*SUCCESSFUL.*\"\n\n Retrieving pipeline run logs list...\n Retrieving pipeline run log 9...\n Extracting output from logs...\n { 'data': '2025-08-23T08:07:29.0226728Z SUCCESSFUL',\n 'run_id': 3210,\n 'status': 200}\n\nArguments\n---------\n\n- -t PAT (Personal Access Token) for Azure DevOps authentication.\n- -o Organization name in Azure DevOps.\n- -p Project ID or name in Azure DevOps.\n- -l Pipeline ID in Azure DevOps.\n- -d (Optional) JSON string with run parameters.\n- -r (Optional) Specific run ID to fetch logs from.\n- -g (Optional) Specific log ID to fetch.\n- -s (Optional) Regex pattern to search for in the logs.\n\nReturn Value\n------------\n\nA dictionary with the following keys:\n\n- data: The matched log line or an empty string if no match is found.\n- run_id: The ID of the pipeline run.\n- status: The HTTP status code of the API response.\n",
"bugtrack_url": null,
"license": "GPL-2.0-only",
"summary": "Call Azure DevOps pipeline and optionally search output.",
"version": "1.0.2",
"project_urls": {
"Homepage": "https://gitlab.com/fer1035_python/modules/pypi-azdo_pipeline",
"Repository": "https://gitlab.com/fer1035_python/modules/pypi-azdo_pipeline"
},
"split_keywords": [
"azure",
" devops",
" pipelines",
" api",
" search"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5f9099d458eebdd2a2ef221b61e3f70cc2b0ef22e4f73a998a39704cebdd06cc",
"md5": "51e61cf451d0499ba6bccc1c3924c90e",
"sha256": "31237be04ccd56dda23c2aac294886702cb709dc40fb4601c5d655e73e7d1cf5"
},
"downloads": -1,
"filename": "azdo_pipeline-1.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "51e61cf451d0499ba6bccc1c3924c90e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 5925,
"upload_time": "2025-08-27T11:26:04",
"upload_time_iso_8601": "2025-08-27T11:26:04.420252Z",
"url": "https://files.pythonhosted.org/packages/5f/90/99d458eebdd2a2ef221b61e3f70cc2b0ef22e4f73a998a39704cebdd06cc/azdo_pipeline-1.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d92eb429424f1a9a778bcef1298926040d78fd2487d77b3f578d594c92e2dea0",
"md5": "4969d3046ff32f93580c6f665ae64088",
"sha256": "ec84bf8490f87c2641026078f2e72b65295d922d16d2fb5b2ae8a1455d8950a7"
},
"downloads": -1,
"filename": "azdo_pipeline-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "4969d3046ff32f93580c6f665ae64088",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 4232,
"upload_time": "2025-08-27T11:26:06",
"upload_time_iso_8601": "2025-08-27T11:26:06.520703Z",
"url": "https://files.pythonhosted.org/packages/d9/2e/b429424f1a9a778bcef1298926040d78fd2487d77b3f578d594c92e2dea0/azdo_pipeline-1.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-27 11:26:06",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "fer1035_python",
"gitlab_project": "modules",
"lcname": "azdo_pipeline"
}