polarion_rest_api_client.clients package¶
Implementations for all project specific clients.
Submodules¶
polarion_rest_api_client.clients.base_classes module¶
Base classes for client implementations on project Level.
- class polarion_rest_api_client.clients.base_classes.BaseClient(project_id: str, client: polarion_client.PolarionClient)¶
Bases:
GenericThe overall base client for all project related clients.
- class polarion_rest_api_client.clients.base_classes.CreateClient(project_id: str, client: polarion_client.PolarionClient)¶
Bases:
BaseClient[T],ABCA client for items of a project, which can be created.
- class polarion_rest_api_client.clients.base_classes.DeleteClient(project_id: str, client: polarion_client.PolarionClient)¶
Bases:
BaseClient[T],ABCA client for items of a project, which can be created.
- class polarion_rest_api_client.clients.base_classes.MultiGetClient(project_id: str, client: polarion_client.PolarionClient)¶
Bases:
BaseClient[T],ABCA client for items of a project, which can be created.
- async async_get_all(*args: Any, **kwargs: Any) list[T]¶
Return all matching items using get_multi with auto pagination.
- abstractmethod async async_get_multi(*args: Any, page_size: int = 100, page_number: int = 1, **kwargs: Any) tuple[list[T], bool]¶
Get multiple matching items for a specific page.
In addition, a flag whether a next page is available is returned.
- class polarion_rest_api_client.clients.base_classes.SingleGetClient(project_id: str, client: polarion_client.PolarionClient)¶
Bases:
BaseClient[T],ABCA client for items of a project, which can be created.
- class polarion_rest_api_client.clients.base_classes.StatusItemClient(project_id: str, client: polarion_client.PolarionClient, delete_status: str | None = None)¶
Bases:
UpdateClient[ST],DeleteClient[ST],ABCA client for items, which have a status.
We support to set a specific status for these instead of deleting them. This status has to be provided on initialization.
- class polarion_rest_api_client.clients.base_classes.UpdateClient(project_id: str, client: polarion_client.PolarionClient)¶
Bases:
BaseClient[T],ABCA client for items which can also be updated.
polarion_rest_api_client.clients.documents module¶
Implementation of the documents client.
- class polarion_rest_api_client.clients.documents.Documents(project_id: str, client: polarion_client.PolarionClient)¶
Bases:
SingleGetClient,CreateClient,UpdateClient[Document]A client to work with documents in Polarion.
polarion_rest_api_client.clients.projects module¶
A client for a specific project, using the session of PolarionClient.
polarion_rest_api_client.clients.test_parameters module¶
Clients to handle test parameters.
- class polarion_rest_api_client.clients.test_parameters.TestRecordParameters(project_id: str, client: polarion_client.PolarionClient)¶
Bases:
MultiGetClient[TestRecordParameter],CreateClient[TestRecordParameter],DeleteClient[TestRecordParameter]Clients to handle TestParameters of a TestRecord.
- class polarion_rest_api_client.clients.test_parameters.TestRunParameters(project_id: str, client: polarion_client.PolarionClient)¶
Bases:
MultiGetClient[TestRunParameter],CreateClient[TestRunParameter],DeleteClient[TestRunParameter]Client to handle TestParameters of a TestRun.
polarion_rest_api_client.clients.test_records module¶
- class polarion_rest_api_client.clients.test_records.TestRecords(project_id: str, client: polarion_client.PolarionClient)¶
Bases:
CreateClient[TestRecord],MultiGetClient[TestRecord],DeleteClient[TestRecord],UpdateClient[TestRecord]
polarion_rest_api_client.clients.test_runs module¶
- class polarion_rest_api_client.clients.test_runs.TestRuns(project_id: str, client: polarion_client.PolarionClient)¶
Bases:
MultiGetClient[TestRun],UpdateClient[TestRun],CreateClient[TestRun],DeleteClient[TestRun]- async async_get_multi(query: str = '', *, page_size: int = 100, page_number: int = 1, fields: dict[str, str] | None = None) tuple[list[TestRun], bool]¶
Return the test runs on a defined page matching the given query.
In addition, a flag whether a next page is available is returned. Define a fields dictionary as described in the Polarion API documentation to get certain fields.
- get_multi(query: str = '', *, page_size: int = 100, page_number: int = 1, fields: dict[str, str] | None = None) tuple[list[TestRun], bool]¶
Return the test runs on a defined page matching the given query.
In addition, a flag whether a next page is available is returned. Define a fields dictionary as described in the Polarion API documentation to get certain fields.
polarion_rest_api_client.clients.test_steps module¶
- class polarion_rest_api_client.clients.test_steps.TestSteps(project_id: str, client: polarion_client.PolarionClient)¶
Bases:
MultiGetClient[TestStep],UpdateClient[TestStep],DeleteClient[TestStep],CreateClient[TestStep]
polarion_rest_api_client.clients.work_item_attachments module¶
Implementations of WorkItemAttachment relates functions.
- class polarion_rest_api_client.clients.work_item_attachments.WorkItemAttachments(project_id: str, client: polarion_client.PolarionClient)¶
Bases:
UpdateClient[WorkItemAttachment],MultiGetClient[WorkItemAttachment],CreateClient[WorkItemAttachment],DeleteClient[WorkItemAttachment]A class to handle WorkItemAttachments.
- async async_get_multi(work_item_id: str, *, page_size: int = 100, page_number: int = 1, fields: dict[str, str] | None = None, revision: str | None = None) tuple[list[WorkItemAttachment], bool]¶
Return the attachments for a given work item on a defined page.
In addition, a flag whether a next page is available is returned. Define a fields dictionary as described in the Polarion API documentation to get certain fields.
- get_multi(work_item_id: str, *, page_size: int = 100, page_number: int = 1, fields: dict[str, str] | None = None, revision: str | None = None) tuple[list[WorkItemAttachment], bool]¶
Return the attachments for a given work item on a defined page.
In addition, a flag whether a next page is available is returned. Define a fields dictionary as described in the Polarion API documentation to get certain fields.
polarion_rest_api_client.clients.work_item_links module¶
Implementation of LinkedWorkItems operations.
- class polarion_rest_api_client.clients.work_item_links.WorkItemLinks(project_id: str, client: polarion_client.PolarionClient)¶
Bases:
CreateClient[WorkItemLink],MultiGetClient[WorkItemLink],DeleteClient[WorkItemLink]A client providing LinkedWorkItems functions.
- async async_get_multi(work_item_id: str, *, page_size: int = 100, page_number: int = 1, fields: dict[str, str] | None = None, include: str | None | Unset = None, revision: str | None | Unset = None) tuple[list[WorkItemLink], bool]¶
Get the work item links for the given work item on a page.
In addition, a flag whether a next page is available is returned. Define a fields dictionary as described in the Polarion API documentation to get certain fields.
- get_multi(work_item_id: str, *, page_size: int = 100, page_number: int = 1, fields: dict[str, str] | None = None, include: str | None | Unset = None, revision: str | None | Unset = None) tuple[list[WorkItemLink], bool]¶
Get the work item links for the given work item on a page.
In addition, a flag whether a next page is available is returned. Define a fields dictionary as described in the Polarion API documentation to get certain fields.
polarion_rest_api_client.clients.work_items module¶
Implementation of a client providing work item specific functions.
- class polarion_rest_api_client.clients.work_items.WorkItems(project_id: str, client: polarion_client.PolarionClient, delete_status: str | None = None)¶
Bases:
StatusItemClient,MultiGetClient,SingleGetClient,DeleteClient,CreateClientA project specific client for work item operations.
- async async_create(items: WorkItem | list[WorkItem]) None¶
Create WorkItems and respect the max body size of the server.
- async async_get(work_item_id: str, work_item_cls: type[WT], revision: str | None = None) WT | None¶
- async async_get(work_item_id: str, *, revision: str | None = None) WorkItem | None
Return one specific work item with all fields.
This also includes all linked work items and attachments. If there are to many of these to get them in one request, the truncated flags for linked_work_items and attachments will be set to True.
- async async_get_multi(query: str = '', *, page_size: int = 100, page_number: int = 1, fields: dict[str, str] | None = None, work_item_cls: type[WT], revision: str | None = None) tuple[list[WT], bool]¶
- async async_get_multi(query: str = '', *, page_size: int = 100, page_number: int = 1, fields: dict[str, str] | None = None, revision: str | None = None) tuple[list[WorkItem], bool]
Return the work items on a defined page matching the given query.
In addition, a flag whether a next page is available is returned. Define a fields dictionary as described in the Polarion API documentation to get certain fields.
- async async_update(items: WorkItem | list[WorkItem]) None¶
Update WorkItems and respect max body size and batch limits.
- create(items: WorkItem | list[WorkItem]) None¶
Create WorkItems and respect the max body size of the server.
- get(work_item_id: str, work_item_cls: type[WT], revision: str | None = None) WT | None¶
- get(work_item_id: str, *, revision: str | None = None) WorkItem | None
Return one specific work item with all fields.
This also includes all linked work items and attachments. If there are to many of these to get them in one request, the truncated flags for linked_work_items and attachments will be set to True.
- get_multi(query: str = '', *, page_size: int = 100, page_number: int = 1, fields: dict[str, str] | None = None, work_item_cls: type[WT], revision: str | None = None) tuple[list[WT], bool]¶
- get_multi(query: str = '', *, page_size: int = 100, page_number: int = 1, fields: dict[str, str] | None = None, revision: str | None = None) tuple[list[WorkItem], bool]
Return the work items on a defined page matching the given query.
In addition, a flag whether a next page is available is returned. Define a fields dictionary as described in the Polarion API documentation to get certain fields.