{"id":13647437,"url":"https://github.com/v1k45/python-qBittorrent","last_synced_at":"2025-04-22T02:31:41.150Z","repository":{"id":44708846,"uuid":"48573028","full_name":"v1k45/python-qBittorrent","owner":"v1k45","description":"Python wrapper for qBittorrent Web API (for versions above v3.1.x)","archived":false,"fork":false,"pushed_at":"2024-06-21T15:34:35.000Z","size":100,"stargazers_count":250,"open_issues_count":1,"forks_count":43,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-20T21:02:29.307Z","etag":null,"topics":["api-client","python","qbittorrent","torrent","torrent-api"],"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/v1k45.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":"2015-12-25T08:22:38.000Z","updated_at":"2025-02-09T03:54:17.000Z","dependencies_parsed_at":"2024-11-09T21:31:23.034Z","dependency_job_id":"c0193751-630c-4677-97ab-9182a9f03295","html_url":"https://github.com/v1k45/python-qBittorrent","commit_stats":{"total_commits":66,"total_committers":13,"mean_commits":5.076923076923077,"dds":0.3484848484848485,"last_synced_commit":"ad3631a7db30a0f8d7dfa9fc455bf3965758353b"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v1k45%2Fpython-qBittorrent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v1k45%2Fpython-qBittorrent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v1k45%2Fpython-qBittorrent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v1k45%2Fpython-qBittorrent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/v1k45","download_url":"https://codeload.github.com/v1k45/python-qBittorrent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249961540,"owners_count":21352091,"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":["api-client","python","qbittorrent","torrent","torrent-api"],"created_at":"2024-08-02T01:03:33.636Z","updated_at":"2025-04-22T02:31:40.786Z","avatar_url":"https://github.com/v1k45.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# python-qBittorrent\n\n[![Documentation Status](https://readthedocs.org/projects/python-qbittorrent/badge/?version=latest)](http://python-qbittorrent.readthedocs.org/en/latest/?badge=latest) [![image](https://badge.fury.io/py/python-qbittorrent.svg)](https://badge.fury.io/py/python-qbittorrent)\n\nPython wrapper for qBittorrent Web API (for versions above 4.1, for\nversion below and above v3.1.x please use 0.3.1 version).\n\nFor qBittorrent clients with earlier versions, use *mookfist\\'s*\n[python-qbittorrent](https://github.com/mookfist/python-qbittorrent).\n\nThis wrapper is based on the methods described in [qBittorrent\\'s\nOfficial Web API\nDocumentation](https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation)\n\nSome methods are only supported in qBittorent\\'s latest version (v3.3.1\nwhen writing).\n\nIt\\'ll be best if you upgrade your client to a latest version.\n\n## Installation\n\nThe best way is to install a stable release from PyPI:\n\n    $ pip install python-qbittorrent\n\nYou can also stay on the bleeding edge of the package:\n\n    $ git clone https://github.com/v1k45/python-qBittorrent.git\n    $ cd python-qBittorrent\n    $ python setup.py install\n\n## Prerequisite\n\nqBittorent webUI must be enabled before using this API client. [How to\nenable the qBittorrent Web\nUI](https://github.com/lgallard/qBittorrent-Controller/wiki/How-to-enable-the-qBittorrent-Web-UI)\n\n## Quick usage guide\n\n``` python\nfrom qbittorrent import Client\n\nqb = Client('http://127.0.0.1:8080/')\n\nqb.login('admin', 'your-secret-password')\n# not required when 'Bypass from localhost' setting is active.\n# defaults to admin:admin.\n# to use defaults, just do qb.login()\n\ntorrents = qb.torrents()\n\nfor torrent in torrents:\n    print(torrent['name'])\n```\n\nIf you have enabled SSL and are using a self-signed certificate, you\\'d\nprobably want to disable SSL verification. This can be done by passing\n[verify=False]{.title-ref} while initializing the [Client]{.title-ref}.\n\n``` python\nfrom qbittorrent import Client\n\nqb = Client('https://127.0.0.1:8080/', verify=False)\n```\n\n## API methods\n\n### Getting torrents\n\n-   Get all `active` torrents:\n\n        qb.torrents()\n\n-   Filter torrents:\n\n        qb.torrents(filter='downloading', category='my category')\n        # This will return all torrents which are currently\n        # downloading and are labeled as ``my category``.\n\n        qb.torrents(filter='paused', sort='ratio')\n        # This will return all paused torrents sorted by their Leech:Seed ratio.\n\nRefer qBittorents WEB API documentation for all possible filters.\n\n### Downloading torrents\n\n-   Download torrents by link:\n\n        magnet_link = \"magnet:?xt=urn:btih:e334ab9ddd91c10938a7.....\"\n        qb.download_from_link(magnet_link)\n\n        # No matter the link is correct or not,\n        # method will always return empty JSON object.\n\n-   Download multipe torrents by list of links:\n\n        link_list = [link1, link2, link3]\n        qb.download_from_link(link_list)\n\n-   Downloading torrents by file:\n\n        torrent_file = open('my-torrent-file.torrent', 'rb')\n        qb.download_from_file(torrent_file)\n\n-   Downloading multiple torrents by using files:\n\n        torrent_file_list = [open('1.torrent', 'rb'), open('2.torrent', 'rb')]\n        qb.download_from_file(torrent_file_list)\n\n-   Specifing save path for downloads:\n\n        dl_path = '/home/user/Downloads/special-dir/'\n        qb.download_from_file(myfile, savepath=dl_path)\n\n        # same for links.\n        qb.download_from_link(my_magnet_uri, savepath=dl_path)\n\n-   Applying labels to downloads:\n\n        qb.download_from_file(myfile, label='secret-files ;) ')\n\n        # same for links.\n        qb.download_from_link(my_magnet_uri, category='anime')\n\n### Pause / Resume torrents\n\n-   Pausing/ Resuming all torrents:\n\n        qb.pause_all()\n        qb.resume_all()\n\n-   Pausing/ Resuming a speicific torrent:\n\n        info_hash = 'e334ab9ddd....infohash....5d7fff526cb4'\n        qb.pause(info_hash)\n        qb.resume(info_hash)\n\n-   Pausing/ Resuming multiple torrents:\n\n        info_hash_list = ['e334ab9ddd9......infohash......fff526cb4',\n                          'c9dc36f46d9......infohash......90ebebc46',\n                          '4c859243615......infohash......8b1f20108']\n\n        qb.pause_multiple(info_hash_list)\n        qb.resume_multipe(info_hash_list)\n\n## Full API method documentation\n\nAll API methods of qBittorrent are mentioned @ [Read the\ndocs](http://python-qbittorrent.readthedocs.org/en/latest/?badge=latest)\n\n## 🤝 Maintainer\n\n-   [Vikas Yadav (v1k45)](https://www.github.com/v1k45/)\n-   [Antonio Goncalves (DEADSEC-SECURITY)](https://github.com/DEADSEC-SECURITY)\n\n## 🤝 Contributors\n\u003ca href=\"https://github.com/v1k45/python-qBittorrent/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=v1k45/python-qBittorrent\" /\u003e\n\u003c/a\u003e\n\nMade with [contrib.rocks](https://contrib.rocks).\n\n## TODO\n\n-   Write tests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fv1k45%2Fpython-qBittorrent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fv1k45%2Fpython-qBittorrent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fv1k45%2Fpython-qBittorrent/lists"}