{"id":19509258,"url":"https://github.com/opentmi/opentmi-pyclient","last_synced_at":"2026-03-15T22:34:29.386Z","repository":{"id":2471602,"uuid":"46626377","full_name":"OpenTMI/opentmi-pyclient","owner":"OpenTMI","description":"Python client for OpenTMI","archived":false,"fork":false,"pushed_at":"2025-06-23T00:04:42.000Z","size":208,"stargazers_count":0,"open_issues_count":6,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-27T19:58:20.295Z","etag":null,"topics":["client-library","opentmi"],"latest_commit_sha":null,"homepage":null,"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/OpenTMI.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-11-21T17:47:39.000Z","updated_at":"2025-03-21T20:41:30.000Z","dependencies_parsed_at":"2024-06-26T07:48:55.630Z","dependency_job_id":"f3c43288-6b82-4746-8071-9df1121fa661","html_url":"https://github.com/OpenTMI/opentmi-pyclient","commit_stats":{"total_commits":75,"total_committers":7,"mean_commits":"10.714285714285714","dds":0.52,"last_synced_commit":"b57b9e127f1a86c714035e51fe054f7d366ab8a8"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/OpenTMI/opentmi-pyclient","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenTMI%2Fopentmi-pyclient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenTMI%2Fopentmi-pyclient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenTMI%2Fopentmi-pyclient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenTMI%2Fopentmi-pyclient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenTMI","download_url":"https://codeload.github.com/OpenTMI/opentmi-pyclient/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenTMI%2Fopentmi-pyclient/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268696952,"owners_count":24292387,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"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":["client-library","opentmi"],"created_at":"2024-11-10T23:11:29.619Z","updated_at":"2026-03-15T22:34:29.340Z","avatar_url":"https://github.com/OpenTMI.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python Client library for OpenTMI\n\n[![CI Pipeline](https://github.com/OpenTMI/opentmi-pyclient/actions/workflows/ci.yml/badge.svg)](https://github.com/OpenTMI/opentmi-pyclient/actions/workflows/ci.yml)\n[![Coverage Status](https://coveralls.io/repos/github/OpenTMI/opentmi-pyclient/badge.svg)](https://coveralls.io/github/OpenTMI/opentmi-pyclient)\n[![PyPI version](https://badge.fury.io/py/opentmi-client.svg)](https://badge.fury.io/py/opentmi-client)\n\nThis is the Python client library for [OpenTMI](https://github.com/opentmi/opentmi).\n\n## installation\n\nTo install, simply use `pip`:\n\n`$ pip install --upgrade opentmi-client`\n\nSee the [Developers Guide](development.md) if you want to develop this library.\n\n## Command Line Interface\n\nLibrary provides Command line Interface to communicate with OpenTMI -backend\n\n```\n$ opentmi --help\nusage: opentmi [-h] [-v] [-s] [--host HOST] [--user USER]\n               [--password PASSWORD] [--token TOKEN]\n               [--token_service TOKEN_SERVICE] [-p PORT]\n               \u003csubcommand\u003e ...\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -v                    verbose level... repeat up to three times.\n  -s, --silent          Silent - only errors will be printed\n  --host HOST           OpenTMI host, default: localhost\n  --user USER           username\n  --password PASSWORD   password\n  --token TOKEN         Authentication token\n  --token_service TOKEN_SERVICE\n                        Optional authentication service\n  -p PORT, --port PORT  OpenTMI port\n\nsubcommand:\n  \u003csubcommand\u003e          sub-command help\n    version             Display version information\n    list                List something\n    store               Create something\n```\n\nexample:\n```\nopentmi --host localhost --port 3000 --list --testcases 1\n```\n\n## Python API\n\n```\nfrom opentmi_client import OpenTmiClient, Result, Event\nclient = Client(\"https://127.0.0.1\")\nclient.login_with_access_token(\"my-github-access-token\")\n\n# post result\nresult = Result()\nresult.tcid = \"test-case-a\"\nresult.verdict = \"pass\"\nclient.post_result(result)\n\n# post event\nevent = Event()\nevent.msgid = \"ALLOCATED\"\nevent.priority.level = \"info\",\nevent.ref.resource = \"5697740f956cd2fd35c69062\"\nclient.post_event(event)\n```\n\nSee more examples from [here](https://github.com/OpenTMI/opentmi-pyclient/tree/master/examples).\n\nServer side Result schema can be found from [here](https://github.com/OpenTMI/opentmi/blob/master/app/models/results.js#L15).\nand Test case schema is available [here](https://github.com/OpenTMI/opentmi/blob/master/app/models/testcase.js).\n\n**notes**\n\n* `tcid` -field have to be unique for each test cases.\n* There is couple mandatory fields by default: `tcid` and `exec.verdict`. Allowed values for result verdict is: `pass`, `fail`, `inconclusive`, `blocked` and `error`. `upload_results()` -function also create test case document if it doesn't exists in database.\n\n## Authentication\n\nThere are multiple options to authenticate:\n* use `Client.login(\u003cusername\u003e, \u003cpassword\u003e)`\n* use `Client.login_with_access_token(\u003ctoken\u003e, [\u003cservice\u003e])`\n  * service are optional and supported values depend on server support.\n   By default `github` is in use.\n* Use environment variables (tries login automatically when constructor is called):\n  * Using username and password: `OPENTMI_USERNAME` and `OPENTMI_PASSWORD` or\n  * Using github access token: `OPENTMI_GITHUB_ACCESS_TOKEN`\n* use token in host like `http://\u003ctoken\u003e@localhost`\n\n## LICENSE\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopentmi%2Fopentmi-pyclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopentmi%2Fopentmi-pyclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopentmi%2Fopentmi-pyclient/lists"}