Skip to main content

A small package to abstract the generation of Zephyr Squad API tokens

Project description

Zephyr Squad API Token generator

Made by translating the methods in the com.thed.zephyr.cloud.rest.ZFJCloudRestClient Java package into Python

Contributions are welcome! Repository

Installation

pip install zephyr-squad-api-token-generator

Usage

from zephyr_squad_api_token_generator import generate_zephyr_jwt

jwt_token = generate_zephyr_jwt(
    endpoint_url="https://prod-api.zephyr4jiracloud.com/connect/public/rest/api/1.0/zql/search",
    http_method="GET",
    access_key="your-zephyr-access-key",
    secret_key="your-zephyr-secret-key",
    zephyr_username="your-atlassian-username",
)

# Use the token in your API request headers. For example:
headers = {"Content-Type": "application/json", "Authorization": f"JWT {jwt_token}", "zapiAccessKey": "your-zephyr-access-key"}

Development

Since this is a Poetry package, changes require rebuilding the dist/ folder. Run this from the repo root (where pyproject.toml lives). Dependencies listed in pyproject.toml would be installed: poetry build

If you want a clean rebuild, you can delete the dist/ folder first.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zephyr_squad_api_token_generator-0.1.0.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file zephyr_squad_api_token_generator-0.1.0.tar.gz.

File metadata

File hashes

Hashes for zephyr_squad_api_token_generator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 666d73f7fcdeaad813653564c6677021a99e5b1c45ba7b62b1b8eecc4310fb13
MD5 c989fea8ff14169b04fc715881600a1e
BLAKE2b-256 e809a275c36e70cf783bce0dfddd8a5d282ebbeb86014dadd2ec6865a84439f9

See more details on using hashes here.

File details

Details for the file zephyr_squad_api_token_generator-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for zephyr_squad_api_token_generator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 70536bb9003733c4353bebee8d1c6d23ec77188ff2ce70b1fad8b430b4b683b7
MD5 b50e28ef563bfdade7afd3abf9812316
BLAKE2b-256 8a961450be5534f3c42f4bb1288fcae63f858b30a95e75c8ec233418297579c8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page