# Python-polarion
[](https://dev.azure.com/jraemaekers/Python%20Polarion/_build/latest?definitionId=5)


[](https://python-polarion.readthedocs.io/en/latest/?badge=latest)
[](https://pepy.tech/project/polarion)
This package allows the user to access many Polarion items like workitems, test run, plans and documents.
# Feature overview
This package can, among others, read, modify and create:
- Workitems
- Test runs from templates
- Plans
- Documents
Work with attachments in workitems and test runs.
Work with custom field in workitems and documents.
# Installation
```
pip install polarion
```
# Getting started
Creating the Polarion client and getting workitems, test runs or plans:
```python
from polarion import polarion
client = polarion.Polarion('http://example.com/polarion', 'user', 'password')
project = client.getProject('Python')
workitem = project.getWorkitem('PYTH-510')
run = project.getTestRun('SWQ-0001')
plan = project.getPlan('00002')
```
Modifying workitems:
```python
workitem.setDescription('Some description..')
workitem.addComment('test comment', 'sent from Python')
workitem.addHyperlink('google.com', workitem.HyperlinkRoles.EXTERNAL_REF)
```
Or test run results:
```python
run = project.getTestRun('SWQ-0001')
run.records[0].setResult(record.Record.ResultType.PASSED, ' Comment with test result')
```
Adding workitems to a plan:
```python
plan.addToPlan(workitem)
plan.removeFromPlan(workitem)
```
More examples to be found in the quick start section of the documentation.
[Go to the documentation](https://python-polarion.readthedocs.io/)
# How does it work?
This project uses the SOAP API of Polarion. This API exposes most of the user interactions you can do with Polarion like creating or editing workitems, plans and test runs.
The API is divided in seven different services which you can find from your Polarion instance at the url http://domain.com/polarion/ws/services.
Each of the services provides a WSDL file detailing the available functions. (Also available form you local instance at http://domain.com/polarion/ws/services/TrackerWebService?wsdl)
For this project the TrackerWebService, PlanningWebService and TestManagementWebService are the most used ones.
In general the project attempts for the objects (like workitems) to behave like Python objects which you can modify and are saved in the background.
Where the API provide operation to preform an action that API call is used, and the object is reloaded from polarion to reflect the changes locally.
The API does not allow access to the project administration.
# Dependencies
The package uses; requests, urllib3 and zeep.
It is tested for Python version 3.7 through 3.12.
Python 3.6 support has been dropped in 1.3.0.
# Known issues or missing features
- No way of knowing the test run possible statuses.
- Deleting work items used in documents does not remove the reference from the document.
Raw data
{
"_id": null,
"home_page": "https://github.com/jesper-raemaekers/python-polarion",
"name": "polarion",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": null,
"author": "Jesper Raemaekers",
"author_email": "j.raemaekers@relek.nl",
"download_url": "https://files.pythonhosted.org/packages/e4/4d/ef1091883cd5cf2e6f6bc6c195f0b744d3bf1c0e9fb5925ac306fedaacb6/polarion-1.4.0.tar.gz",
"platform": null,
"description": "# Python-polarion\n[](https://dev.azure.com/jraemaekers/Python%20Polarion/_build/latest?definitionId=5)\n\n\n[](https://python-polarion.readthedocs.io/en/latest/?badge=latest)\n[](https://pepy.tech/project/polarion)\n\n\nThis package allows the user to access many Polarion items like workitems, test run, plans and documents.\n\n\n# Feature overview\n\nThis package can, among others, read, modify and create:\n- Workitems\n- Test runs from templates\n- Plans\n- Documents\n\nWork with attachments in workitems and test runs. \nWork with custom field in workitems and documents.\n\n# Installation\n\n```\npip install polarion\n```\n\n# Getting started\n\nCreating the Polarion client and getting workitems, test runs or plans:\n\n```python\nfrom polarion import polarion\nclient = polarion.Polarion('http://example.com/polarion', 'user', 'password')\nproject = client.getProject('Python')\nworkitem = project.getWorkitem('PYTH-510')\nrun = project.getTestRun('SWQ-0001')\nplan = project.getPlan('00002')\n```\n\nModifying workitems:\n\n```python\nworkitem.setDescription('Some description..')\nworkitem.addComment('test comment', 'sent from Python')\nworkitem.addHyperlink('google.com', workitem.HyperlinkRoles.EXTERNAL_REF)\n```\n\nOr test run results:\n```python\nrun = project.getTestRun('SWQ-0001')\nrun.records[0].setResult(record.Record.ResultType.PASSED, ' Comment with test result')\n```\n\nAdding workitems to a plan:\n```python\nplan.addToPlan(workitem)\nplan.removeFromPlan(workitem)\n```\n\n\nMore examples to be found in the quick start section of the documentation.\n[Go to the documentation](https://python-polarion.readthedocs.io/)\n\n# How does it work?\n\nThis project uses the SOAP API of Polarion. This API exposes most of the user interactions you can do with Polarion like creating or editing workitems, plans and test runs.\nThe API is divided in seven different services which you can find from your Polarion instance at the url http://domain.com/polarion/ws/services.\nEach of the services provides a WSDL file detailing the available functions. (Also available form you local instance at http://domain.com/polarion/ws/services/TrackerWebService?wsdl)\nFor this project the TrackerWebService, PlanningWebService and TestManagementWebService are the most used ones.\n\nIn general the project attempts for the objects (like workitems) to behave like Python objects which you can modify and are saved in the background. \nWhere the API provide operation to preform an action that API call is used, and the object is reloaded from polarion to reflect the changes locally.\n\nThe API does not allow access to the project administration.\n\n# Dependencies \n\nThe package uses; requests, urllib3 and zeep.\n\nIt is tested for Python version 3.7 through 3.12.\nPython 3.6 support has been dropped in 1.3.0.\n\n# Known issues or missing features\n- No way of knowing the test run possible statuses.\n- Deleting work items used in documents does not remove the reference from the document.\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Polarion client for Python",
"version": "1.4.0",
"project_urls": {
"Bug Tracker": "https://github.com/jesper-raemaekers/python-polarion/issues",
"Documentation": "https://python-polarion.readthedocs.io/",
"Homepage": "https://github.com/jesper-raemaekers/python-polarion"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "acb12c185c6306e9a3a7405297f9397c64a5ebd1bb8c4076bcd4e0c6c62e44d3",
"md5": "6e020a62bf205e453185f8d02ac87586",
"sha256": "b8edacd84a1b0a164b8c8d4763a9c3c5c4c874745db8ee9d89e26b3d46af89b1"
},
"downloads": -1,
"filename": "polarion-1.4.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6e020a62bf205e453185f8d02ac87586",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 50261,
"upload_time": "2024-05-23T18:22:54",
"upload_time_iso_8601": "2024-05-23T18:22:54.614258Z",
"url": "https://files.pythonhosted.org/packages/ac/b1/2c185c6306e9a3a7405297f9397c64a5ebd1bb8c4076bcd4e0c6c62e44d3/polarion-1.4.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e44def1091883cd5cf2e6f6bc6c195f0b744d3bf1c0e9fb5925ac306fedaacb6",
"md5": "c9130eff39ec71d1e25fb1f8f653b934",
"sha256": "df3f57b8f1441d5c84017e334fb0963e4edcef15e2fe3f289ddaae0108669a64"
},
"downloads": -1,
"filename": "polarion-1.4.0.tar.gz",
"has_sig": false,
"md5_digest": "c9130eff39ec71d1e25fb1f8f653b934",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 40927,
"upload_time": "2024-05-23T18:22:56",
"upload_time_iso_8601": "2024-05-23T18:22:56.834072Z",
"url": "https://files.pythonhosted.org/packages/e4/4d/ef1091883cd5cf2e6f6bc6c195f0b744d3bf1c0e9fb5925ac306fedaacb6/polarion-1.4.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-23 18:22:56",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jesper-raemaekers",
"github_project": "python-polarion",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "requests",
"specs": [
[
"~=",
"2.31.0"
]
]
},
{
"name": "urllib3",
"specs": [
[
"~=",
"2.0.6"
]
]
},
{
"name": "zeep",
"specs": [
[
"~=",
"4.2.1"
]
]
},
{
"name": "texttable",
"specs": [
[
"~=",
"1.7.0"
]
]
}
],
"lcname": "polarion"
}