Skip to main content

Zephyr-python-api

PyPI - Python Version PyPI PyPI - License

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.

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:

from zephyr import ZephyrScale

zscale = ZephyrScale(token="<your_token>")

Zephyr Server (TM4J) auth:

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:

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

Zephyr Scale Server API docs

Metadata

Release files for zephyr-python-api 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zephyr-python-api 0.1.0
File Size Uploaded
zephyr_python_api-0.1.0.tar.gz 19.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zephyr-python-api 0.1.0
File Interpreter ABI Platform
zephyr_python_api-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 42.1 kB

Release files / zephyr_python_api-0.1.0.tar.gz

Download URL zephyr_python_api-0.1.0.tar.gz
Size 19.4 kB
Tags Source
SHA-256 checksum
How to use checksums
62ea468b26df8706fe238a1fafa44d0734ba2d07f1e41403fd25399d8ae7a859
BLAKE2b-256 checksum
How to use checksums
86091c39dfda9b8c47ea56278e8892650fe5e7fd0b136dc74fd047b66268d18c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.8.18

Release files / zephyr_python_api-0.1.0-py3-none-any.whl

Download URL zephyr_python_api-0.1.0-py3-none-any.whl
Size 22.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f9f8e27d31ef625b273d275086f36b13283647b538cc37b518542817674fdb5
BLAKE2b-256 checksum
How to use checksums
bc9beb95c6647459147e588ad945d499b47fbacc15a5a831382ffeea7b6da737
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.8.18
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page