# Zephyr-python-api
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/zephyr-python-api)
![PyPI](https://img.shields.io/pypi/v/zephyr-python-api)
![PyPI - License](https://img.shields.io/pypi/l/zephyr-python-api)
### Project description
This is a set of wrappers for Zephyr Scale (TM4J) REST API.
This means you can interact with Zephyr Scale without GUI, access it with python code and create
automation scripts for your every day interactions.
For more detailed information please see [the project's documentation](https://zephyr-python-api.readthedocs.io/en/main/index.html).
To be done:
* More usage examples
* Tests, tests and tests for gods of testing
* Convenient docs
* Implementing higher level wrappers representing Test Case, Test Cycle, etc.
### Installation
```
pip install zephyr-python-api
```
### Example usage
Zephyr Cloud auth:
```python
from zephyr import ZephyrScale
zscale = ZephyrScale(token="<your_token>")
```
Zephyr Server (TM4J) auth:
```python
from zephyr import ZephyrScale
# Auth can be made with Jira token
auth = {"token": "<your_jira_token>"}
# or with login and password (suggest using get_pass)
auth = {"username": "<your_login>", "password": "<your_password>"}
# or even session cookie dict
auth = {"cookies": "<session_cookie_dict>"}
zscale = ZephyrScale.server_api(base_url="<your_base_url>", **auth)
```
Then it is possible to interact with api wrappers:
```python
zapi = zscale.api
# Get all test cases
all_test_cases = zapi.test_cases.get_test_cases()
# Get a single test case by its id
test_case = zapi.test_cases.get_test_case("<test_case_id>")
# Create a test case
creation_result = zapi.test_cases.create_test_case("<project_key>", "test_case_name")
```
### License
This library is licensed under the Apache 2.0 License.
### Links
[Zephyr Scale Cloud API docs](https://support.smartbear.com/zephyr-scale-cloud/api-docs/)
[Zephyr Scale Server API docs](https://support.smartbear.com/zephyr-scale-server/api-docs/v1/)
Raw data
{
"_id": null,
"home_page": "https://github.com/nassauwinter/zephyr-python-api",
"name": "zephyr-python-api",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "Petr Sharapenko",
"author_email": "nassauwinter@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/86/09/1c39dfda9b8c47ea56278e8892650fe5e7fd0b136dc74fd047b66268d18c/zephyr_python_api-0.1.0.tar.gz",
"platform": null,
"description": "# Zephyr-python-api\n\n\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/zephyr-python-api)\n![PyPI](https://img.shields.io/pypi/v/zephyr-python-api)\n![PyPI - License](https://img.shields.io/pypi/l/zephyr-python-api)\n### Project description\nThis is a set of wrappers for Zephyr Scale (TM4J) REST API. \nThis means you can interact with Zephyr Scale without GUI, access it with python code and create \nautomation scripts for your every day interactions.\n\nFor more detailed information please see [the project's documentation](https://zephyr-python-api.readthedocs.io/en/main/index.html).\n\nTo be done:\n* More usage examples\n* Tests, tests and tests for gods of testing\n* Convenient docs\n* Implementing higher level wrappers representing Test Case, Test Cycle, etc.\n\n### Installation\n\n```\npip install zephyr-python-api\n```\n\n### Example usage\n\nZephyr Cloud auth:\n```python\nfrom zephyr import ZephyrScale\n\nzscale = ZephyrScale(token=\"<your_token>\")\n```\n\nZephyr Server (TM4J) auth:\n```python\nfrom zephyr import ZephyrScale\n\n# Auth can be made with Jira token\nauth = {\"token\": \"<your_jira_token>\"}\n\n# or with login and password (suggest using get_pass)\nauth = {\"username\": \"<your_login>\", \"password\": \"<your_password>\"}\n\n# or even session cookie dict\nauth = {\"cookies\": \"<session_cookie_dict>\"}\n\nzscale = ZephyrScale.server_api(base_url=\"<your_base_url>\", **auth)\n```\n\nThen it is possible to interact with api wrappers:\n```python\nzapi = zscale.api\n\n# Get all test cases\nall_test_cases = zapi.test_cases.get_test_cases()\n\n# Get a single test case by its id\ntest_case = zapi.test_cases.get_test_case(\"<test_case_id>\")\n\n# Create a test case\ncreation_result = zapi.test_cases.create_test_case(\"<project_key>\", \"test_case_name\")\n```\n\n### License\n\nThis library is licensed under the Apache 2.0 License.\n\n### Links\n\n[Zephyr Scale Cloud API docs](https://support.smartbear.com/zephyr-scale-cloud/api-docs/)\n\n[Zephyr Scale Server API docs](https://support.smartbear.com/zephyr-scale-server/api-docs/v1/)\n",
"bugtrack_url": null,
"license": null,
"summary": "Zephyr (TM4J) Python REST API wrapper",
"version": "0.1.0",
"project_urls": {
"Bug Tracker": "https://github.com/nassauwinter/zephyr-python-api/issues",
"Homepage": "https://github.com/nassauwinter/zephyr-python-api"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "bc9beb95c6647459147e588ad945d499b47fbacc15a5a831382ffeea7b6da737",
"md5": "e0d10e2fae09920fa6c213878cc79e82",
"sha256": "4f9f8e27d31ef625b273d275086f36b13283647b538cc37b518542817674fdb5"
},
"downloads": -1,
"filename": "zephyr_python_api-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e0d10e2fae09920fa6c213878cc79e82",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 22636,
"upload_time": "2024-05-02T16:37:04",
"upload_time_iso_8601": "2024-05-02T16:37:04.642349Z",
"url": "https://files.pythonhosted.org/packages/bc/9b/eb95c6647459147e588ad945d499b47fbacc15a5a831382ffeea7b6da737/zephyr_python_api-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "86091c39dfda9b8c47ea56278e8892650fe5e7fd0b136dc74fd047b66268d18c",
"md5": "1bd0a7d6aadcba7f64ef235d7e149462",
"sha256": "62ea468b26df8706fe238a1fafa44d0734ba2d07f1e41403fd25399d8ae7a859"
},
"downloads": -1,
"filename": "zephyr_python_api-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "1bd0a7d6aadcba7f64ef235d7e149462",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 19418,
"upload_time": "2024-05-02T16:37:06",
"upload_time_iso_8601": "2024-05-02T16:37:06.065182Z",
"url": "https://files.pythonhosted.org/packages/86/09/1c39dfda9b8c47ea56278e8892650fe5e7fd0b136dc74fd047b66268d18c/zephyr_python_api-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-02 16:37:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "nassauwinter",
"github_project": "zephyr-python-api",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "certifi",
"specs": [
[
"==",
"2023.5.7"
]
]
},
{
"name": "charset-normalizer",
"specs": [
[
"==",
"3.1.0"
]
]
},
{
"name": "idna",
"specs": [
[
"==",
"3.4"
]
]
},
{
"name": "requests",
"specs": [
[
"==",
"2.31.0"
]
]
},
{
"name": "urllib3",
"specs": [
[
"==",
"2.0.3"
]
]
}
],
"tox": true,
"lcname": "zephyr-python-api"
}