{"id":20856290,"url":"https://github.com/hide-in-code/tda-python-sdk","last_synced_at":"2026-05-15T16:06:27.535Z","repository":{"id":261166224,"uuid":"382223521","full_name":"hide-in-code/tda-python-sdk","owner":"hide-in-code","description":"testindata 数据集管理sdk","archived":false,"fork":false,"pushed_at":"2021-08-03T10:20:30.000Z","size":47,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-28T02:53:10.002Z","etag":null,"topics":["dataset","metadata","python","testin","testindata"],"latest_commit_sha":null,"homepage":"http://ai-docs.testin.cn/web/#/18/110","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/hide-in-code.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":"2021-07-02T03:50:10.000Z","updated_at":"2021-11-15T01:29:02.000Z","dependencies_parsed_at":"2024-11-05T03:32:37.262Z","dependency_job_id":"d21a65d4-3131-4e0a-bb50-868077eb11b5","html_url":"https://github.com/hide-in-code/tda-python-sdk","commit_stats":null,"previous_names":["hide-in-code/tda-python-sdk"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hide-in-code/tda-python-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hide-in-code%2Ftda-python-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hide-in-code%2Ftda-python-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hide-in-code%2Ftda-python-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hide-in-code%2Ftda-python-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hide-in-code","download_url":"https://codeload.github.com/hide-in-code/tda-python-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hide-in-code%2Ftda-python-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33071615,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["dataset","metadata","python","testin","testindata"],"created_at":"2024-11-18T04:29:53.323Z","updated_at":"2026-05-15T16:06:27.486Z","avatar_url":"https://github.com/hide-in-code.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# testindata Python SDK\n[云测数据](http://ai.testin.cn/)数据集管理系统python SDK\n\n## 准备工作\n\n- 从私有化部署产品或者SAAS服务系统中创建好适合您需求的数据集。\n- 从系统中获取您用于身份认证使用的「AccessKey」。\n- 通过SDK可以对您的数据进行上传和读取的操作，并能使用数据集管理系统提供的数据格式对您的数据做可视化展示。\n\n## 安装\n\n```console\npip install testindata\n```\n\u003e使用本SDK须Python 3.6或更高版本。\n\n## 快速入门\n### 上传文件并添加可视化数据\n\n```python\nfrom testindata.TDA import TDA\n\n#AccessKey 可以从系中对应的位置获取\nAccessKey = \"your_AccessKey\"\n\n#datasetId 从系统对应位置获取\ndatasetId = \"ds_yourdatasetId\"\n\n#实例化全局TDA操作对象, 如果您使用的是SAAS服务，无需设置host，如果您使用的是私有化部署产品，则您需要指明您的数据集服务ip地址\ntda = TDA(AccessKey, host=\"https://dataset.testin.cn/\")\n\n#设置要操作的数据集\ntda.SetDataset(datasetId)\n```\n\n### 上传文件并添加可视化数据\n云测数据数据集管理系统提供了数据可视化的功能，您可以将数据转换为系统规定的数据格式，并由sdk上传至系统，即可从系统中查看可视化的数据。\n\n```python\nfrom testindata.TDA import TDA\n\nAccessKey = \"0fbe149adf07e5f4afa01a7a4e787fde\"\nhost = \"xx.xx.xx.xx\"\n\ntda = TDA(AccessKey, host=host)\n\n#进入debug模式，该模式下sdk会打印出执行信息\ntda.Debug()\n\ndataset = tda.SetDataset(\"ds_******\")\n\nmetaData = {\n    \"metaKey1\":\"metaVal1\",\n    \"metaKey2\":\"metaVal2\",\n    \"metaKey3\":\"metaVal3\",\n}\n\n#添加一个用于可视化的文件\nfile = tda.AddFile(\"/path/to/your/fileRootPath/11.jpg\", referId=\"myTestRefId\", metaData=metaData)\n\nbox = {\n    \"x\": 10,\n    \"y\": 10,\n    \"width\": 100,\n    \"height\": 100,\n}\n\nlabel = \"myTestLabelName\"\n\nattr = {\n    \"attrKey1\":\"attrVal1\",\n    \"attrKey2\":\"attrVal2\",\n    \"attrKey3\":\"attrVal3\",\n}\n\n#为该文件添加一个标注结果\nfile.AddBox2D(box, label=label, attrs=attr)\n\n#上传该文件\nprint(tda.Upload())\n```\n\n### 进入DEBUG模式\n```python\ntda = TDA(AccessKey, debug=True) 或者 tda.debug()\n```\n\u003e在debug模式下，sdk会输出很多执行过程中的信息，以方便您监控整个程序的执行过程。\n\n### 获取文件列表数据\n```python\nfilesData = tda.GetData(offset=1000, limit=1000)\n\nfor file in fileData[\"files\"]:   \n    print(file.fid)\n    print(file.referId)\n    print(file.meta)\n    print(file.md5)\n    print(file.path)\n    \n    for label in file.labeldata.labels:\n        print(label)\n```\n\u003eoffset默认从0开始，limit最大值为1000\n\n### 获取标注结果\n```python\n#根据fid 获取标注结果\nfile = tda.GetFileAndLabel(fid=\"fs_N7T02AgYJGF6yxAbk75R\")\n\n#根据ref_id获取标注结果\nfile = tda.GetFileAndLabel(ref_id=\"myreferId1\")\n\nprint(file.fid)\nprint(file.referId)\nprint(file.meta)\nprint(file.md5)\nprint(file.path)\n\nfor label in file.labeldata.labels:\n    print(label)\n```\n\u003efid 是数据集系统存储文件的唯一id，该id可以唯一定位一个上传文件；ref\\_id是需要您自己维护的一个用于唯一定位资源的id，我们强烈建议您设置资源文件的ref_id，用于关联您自己的业务系统。\n\n\n更多信息查看[sdk官方文档地址](https://testindata.gitbook.io/dataset/python-sdk/untitled)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhide-in-code%2Ftda-python-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhide-in-code%2Ftda-python-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhide-in-code%2Ftda-python-sdk/lists"}