{"id":15684904,"url":"https://github.com/goneri/python-dci","last_synced_at":"2025-03-28T02:48:45.814Z","repository":{"id":57417992,"uuid":"147851986","full_name":"goneri/python-dci","owner":"goneri","description":null,"archived":false,"fork":false,"pushed_at":"2019-01-17T23:11:11.000Z","size":77,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T03:12:39.998Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/goneri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-07T17:00:44.000Z","updated_at":"2019-01-17T23:11:12.000Z","dependencies_parsed_at":"2022-09-03T09:50:22.332Z","dependency_job_id":null,"html_url":"https://github.com/goneri/python-dci","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goneri%2Fpython-dci","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goneri%2Fpython-dci/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goneri%2Fpython-dci/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goneri%2Fpython-dci/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goneri","download_url":"https://codeload.github.com/goneri/python-dci/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245960683,"owners_count":20700777,"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","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":[],"created_at":"2024-10-03T17:22:21.815Z","updated_at":"2025-03-28T02:48:45.507Z","avatar_url":"https://github.com/goneri.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# python-dci\n\n`python-dci` is a transport layer with a nice API to interact with Distributed-CI.\n\n## Direct access to the REST API\n\nYou can this library to directly the DCI API. In this example, we want to retrieve\nall the details from a given job:\n\n```python\nimport dci.client\n\njob_id = '28cd1fe9-f5a8-4f65-8f76-d6b7aa89e08d'\n\nc = dci.client.DCIClient()\n\nuri_tpl = (\n    '/jobs/%s'\n    '?embed=topic,remoteci,components,rconfiguration')\n\njob_info = c.get(uri_tpl % job_id).json()\nprint(job_info)\n```\n\n## The Object interface\n\nThis library also provide an object layer on top of the class DCI API.\n\n### Get a job record\n\n```python\nimport dci.oo\n\njob_id = '28cd1fe9-f5a8-4f65-8f76-d6b7aa89e08d'\n\nc = dci.oo.Engine()\nj = c.jobs.get('1')\n```\n\n### Change the admin password\n\n```python\nimport dci.oo\n\nc = dci.oo.Engine(dci_login=\"admin\")\nadmin = c.users.first(where=\"name:admin\")\nprint(admin.name)\nadmin.password = 'admin'\nadmin.commit()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoneri%2Fpython-dci","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoneri%2Fpython-dci","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoneri%2Fpython-dci/lists"}