{"id":16217259,"url":"https://github.com/synodriver/aioqbittorrent","last_synced_at":"2025-03-19T10:30:43.416Z","repository":{"id":100676230,"uuid":"393236967","full_name":"synodriver/aioqbittorrent","owner":"synodriver","description":"Qbittorrent rpc with asyncio","archived":false,"fork":false,"pushed_at":"2024-12-10T12:42:45.000Z","size":67,"stargazers_count":4,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T17:56:25.441Z","etag":null,"topics":["asyncio","qbittorrent","qbittorrent-api"],"latest_commit_sha":null,"homepage":"","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/synodriver.png","metadata":{"files":{"readme":"README.markdown","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-06T03:30:53.000Z","updated_at":"2024-12-10T12:42:49.000Z","dependencies_parsed_at":"2024-10-27T20:30:48.963Z","dependency_job_id":"f42b79ee-db8c-4fbc-897d-96e802ec0415","html_url":"https://github.com/synodriver/aioqbittorrent","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synodriver%2Faioqbittorrent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synodriver%2Faioqbittorrent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synodriver%2Faioqbittorrent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synodriver%2Faioqbittorrent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/synodriver","download_url":"https://codeload.github.com/synodriver/aioqbittorrent/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243982182,"owners_count":20378605,"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":["asyncio","qbittorrent","qbittorrent-api"],"created_at":"2024-10-10T11:26:19.909Z","updated_at":"2025-03-19T10:30:43.410Z","avatar_url":"https://github.com/synodriver.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\u003ci\u003e✨ aioqb ✨ \u003c/i\u003e\u003c/h1\u003e\n\n\u003ch3 align=\"center\"\u003eThe asyncio  \u003ca href=\"https://github.com/qbittorrent/qBittorrent\"\u003eQbittorrent Client\u003c/a\u003e \u003c/h3\u003e\n\n\n\n[![pypi](https://img.shields.io/pypi/v/aioqb.svg)](https://pypi.org/project/aioqb/)\n![python](https://img.shields.io/pypi/pyversions/aioqb)\n![implementation](https://img.shields.io/pypi/implementation/aioqb)\n![wheel](https://img.shields.io/pypi/wheel/aioqb)\n![license](https://img.shields.io/github/license/synodriver/aioqbittorrent.svg)\n![action](https://img.shields.io/github/workflow/status/synodriver/aioqbittorrent/build%20wheel)\n\n# The asyncio Qbittorrent Client\n\n```python\nimport asyncio\nimport aioqb\n\n\nasync def main():\n    client = aioqb.QbittorrentClient()\n    await client.torrents_add(torrents=[open(\"xxx.torrent\", \"rb\")])\n    print(await client.transfer_info())\n    print(await client.torrents_info())\n\n\nasyncio.run(main())\n```\n### Auto ban thunder\n\n```python\n\"\"\"\nCopyright (c) 2008-2022 synodriver \u003csynodriver@gmail.com\u003e\n\"\"\"\n# Auto ban xunlei without qbee\nimport asyncio\nfrom pprint import pprint\nfrom aioqb import Client\n\nblock_list = [\"xl\", \"xunlei\"]\n\n\nasync def main():\n    async with Client() as client:\n        pprint(await client.auth_login())\n        while True:\n            d = await client.sync_maindata()\n            # pprint(d)\n            torrent_hashs = d['torrents'].keys()\n            rid = d['rid']\n            for t in torrent_hashs:\n                data = await client.sync_torrentPeers(hash=t, rid=0)\n                # filter(lambda x: for ip, peer in data[\"peers\"].items() if , block_list)\n                for ip, peer in data[\"peers\"].items():\n                    # print(ip)\n                    # pprint(v)\n                    for b in block_list:\n                        if b in peer['client'].lower():\n                            await client.transfer_banPeers(ip)\n                            print(f\"ban peer {ip} {peer['client']}\")\n                            break\n            await asyncio.sleep(1)\n\n\nasyncio.run(main())\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynodriver%2Faioqbittorrent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsynodriver%2Faioqbittorrent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynodriver%2Faioqbittorrent/lists"}