{"id":25869573,"url":"https://github.com/best-doctor/best_testrail_client","last_synced_at":"2026-06-11T05:31:23.380Z","repository":{"id":55027197,"uuid":"260251675","full_name":"best-doctor/best_testrail_client","owner":"best-doctor","description":"TestRail client by BestDoctor","archived":false,"fork":false,"pushed_at":"2023-05-22T23:25:03.000Z","size":141,"stargazers_count":0,"open_issues_count":4,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-17T21:21:36.672Z","etag":null,"topics":["testrail","testrail-api","testrail-python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/best-doctor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-30T15:40:30.000Z","updated_at":"2021-01-14T14:24:49.000Z","dependencies_parsed_at":"2025-06-10T02:00:25.252Z","dependency_job_id":null,"html_url":"https://github.com/best-doctor/best_testrail_client","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/best-doctor/best_testrail_client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/best-doctor%2Fbest_testrail_client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/best-doctor%2Fbest_testrail_client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/best-doctor%2Fbest_testrail_client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/best-doctor%2Fbest_testrail_client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/best-doctor","download_url":"https://codeload.github.com/best-doctor/best_testrail_client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/best-doctor%2Fbest_testrail_client/sbom","scorecard":{"id":234842,"data":{"date":"2025-08-11","repo":{"name":"github.com/best-doctor/best_testrail_client","commit":"1c491bafe894c7dbb78e0dfd9e9bb4d2e0a4ae00"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 1/28 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2023-74 / GHSA-j8r2-6x86-q33q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 3 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T05:26:43.012Z","repository_id":55027197,"created_at":"2025-08-17T05:26:43.013Z","updated_at":"2025-08-17T05:26:43.013Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34184779,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["testrail","testrail-api","testrail-python"],"created_at":"2025-03-02T05:18:42.879Z","updated_at":"2026-06-11T05:31:23.362Z","avatar_url":"https://github.com/best-doctor.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TestRail client by BestDoctor\n\n[![Build Status](https://travis-ci.org/best-doctor/best_testrail_client.svg?branch=master)](https://travis-ci.org/best-doctor/best_testrail_client)\n[![Maintainability](https://api.codeclimate.com/v1/badges/62075568c990aa8677c4/maintainability)](https://codeclimate.com/github/best-doctor/best_testrail_client/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/62075568c990aa8677c4/test_coverage)](https://codeclimate.com/github/best-doctor/best_testrail_client/test_coverage)\n[![PyPI version](https://badge.fury.io/py/best-testrail-client.svg)](https://badge.fury.io/py/best-testrail-client)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/best-testrail-client)](https://pypi.org/project/best-testrail-client/)\n\nImplements [API v2](http://docs.gurock.com/testrail-api2/start) for [TestRail](https://www.gurock.com/testrail/).\n\n## Installation\n\n```bash\npip install best_testrail_client\n```\n\n## Prerequisites\n\n1. Enabled API in your TestRail project.\n\n    ![Enable TestRail API](https://raw.githubusercontent.com/best-doctor/best_testrail_client/master/docs_img/enable_API.png)\n1. Generated API key.\n\n    ![Generate API key](https://raw.githubusercontent.com/best-doctor/best_testrail_client/master/docs_img/API_key.png)\n\n## Usage\n\n```python\nfrom best_testrail_client.client import TestRailClient\nfrom best_testrail_client.enums import BaseResultStatus\nfrom best_testrail_client.models.result import Result\nfrom best_testrail_client.models.run import Run\n\n# Client initialization\nproject_url = 'https://\u003cYOUR_PROJECT\u003e.testrail.io/'  # or other URL for self-hosted\nlogin = '\u003caccount email\u003e'\napi_token = '\u003cgenerated API token\u003e'\n\nclient = TestRailClient(project_url, login, api_token)\n\n# Create Test Run\nnew_run = Run(\n    name='Test Run from API',\n    include_all=False,\n    case_ids=[1, 2, 3],\n)\ncreated_run = client.runs.add_run(run=new_run, project_id=1)\n\n# You can set global Project ID\nclient.set_project_id(project_id=2)\n\n# Add results for run\nresults = [\n    Result(status_id=BaseResultStatus.PASSED.value, case_id=1, comment='Passed test'),\n    Result(status_id=BaseResultStatus.FAILED.value, case_id=2, comment='Failed test'),\n    Result(status_id=6, case_id=3, comment='Waiting test'),  # Custom status\n]\nclient.results.add_results_for_cases(run_id=created_run.id, results=results)\n\n# Close run\nclient.runs.close_run(run_id=created_run.id)\n```\n\n### Custom attributes\n\nCustom attributes are stored in `custom` dictionary attribute in models.\nIt stores all data from API and converts it back.\n\n```python\nfrom best_testrail_client.client import TestRailClient\n\n# Client initialization\nproject_url = 'https://\u003cYOUR_PROJECT\u003e.testrail.io/'  # or other URL for self-hosted\nlogin = '\u003caccount email\u003e'\napi_token = '\u003cgenerated API token\u003e'\n\nclient = TestRailClient(project_url, login, api_token)\n\ncreated_run = client.runs.get_run(run_id=1)\n\n\"\"\"\nAPI response looks like:\n\n{\n    ...\n    'refs': 'SAN-1',\n    'custom_status1_count': 0,\n    'custom_status2_count': 0,\n    'custom_status3_count': 0,\n    'custom_status4_count': 0,\n    'custom_status5_count': 0,\n    'custom_status6_count': 0,\n    'custom_status7_count': 0,\n    'description': null,\n    ...\n}\n\nIt is now stored in custom attribute:\ncreated_run.custom == {\n    'custom_status1_count': 0,\n    'custom_status2_count': 0,\n    'custom_status3_count': 0,\n    'custom_status4_count': 0,\n    'custom_status5_count': 0,\n    'custom_status6_count': 0,\n    'custom_status7_count': 0,\n}\n\"\"\"\n```\n\n## Contributing\n\nWe would love you to contribute to our project. It's simple:\n\n1. Create an issue with bug you found or proposal you have.\n   Wait for approve from maintainer.\n1. Create a pull request. Make sure all checks are green.\n1. Fix review comments if any.\n1. Be awesome.\n\nHere are useful tips:\n\n- You can run all checks and tests with `make check`.\n  Please do it before TravisCI does.\n- We use [BestDoctor python styleguide](https://github.com/best-doctor/guides/blob/master/guides/en/python_styleguide.md).\n- We respect [Django CoC](https://www.djangoproject.com/conduct/).\n  Make soft, not bullshit.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbest-doctor%2Fbest_testrail_client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbest-doctor%2Fbest_testrail_client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbest-doctor%2Fbest_testrail_client/lists"}