{"library":"qase-api-client","title":"Qase API Client","description":"The Qase API Client provides a Python interface for interacting with the Qase TestOps API (v1). It allows programmatic access to manage test cases, test runs, defects, and other TestOps entities. The current version is 2.0.6, and it's part of a larger monorepo with frequent, modular releases across various Qase Python integrations.","language":"python","status":"active","last_verified":"Fri Apr 17","install":{"commands":["pip install qase-api-client"],"cli":null},"imports":["from qaseio.api_client.configuration import Configuration","from qaseio.api_client.api_client import ApiClient","from qaseio.api_client.api.cases_api import CasesApi"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import os\nfrom qaseio.api_client.configuration import Configuration\nfrom qaseio.api_client.api_client import ApiClient\nfrom qaseio.api_client.api.cases_api import CasesApi\n\nQASE_TOKEN = os.environ.get('QASE_TOKEN', 'YOUR_QASE_TOKEN')\nQASE_PROJECT_CODE = os.environ.get('QASE_PROJECT_CODE', 'PRJ') # e.g., 'PRJ'\n\nif QASE_TOKEN == 'YOUR_QASE_TOKEN' or QASE_PROJECT_CODE == 'PRJ':\n    print(\"Please set QASE_TOKEN and QASE_PROJECT_CODE environment variables or replace placeholders.\")\nelse:\n    try:\n        # Configure API key authorization: TokenAuth\n        configuration = Configuration(\n            host=\"https://api.qase.io/v1\",\n            api_key={\"TokenAuth\": QASE_TOKEN}\n        )\n\n        # Create an API client\n        with ApiClient(configuration) as api_client:\n            # Create an instance of the API you want to use\n            cases_api = CasesApi(api_client)\n\n            # Example: Get all cases for a project\n            response = cases_api.get_cases(QASE_PROJECT_CODE)\n            print(f\"Successfully retrieved {len(response.result.entities)} cases.\")\n            # print(response.to_dict())\n\n    except Exception as e:\n        print(f\"An error occurred: {e}\")","lang":"python","description":"This quickstart demonstrates how to initialize the Qase API client, configure it with an API token, and then use it to retrieve test cases from a specified project. Ensure your QASE_TOKEN and QASE_PROJECT_CODE environment variables are set or replace the placeholders.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}