{"id":13815130,"url":"https://github.com/idlesign/torrentool","last_synced_at":"2025-04-05T21:08:07.883Z","repository":{"id":1781753,"uuid":"44694201","full_name":"idlesign/torrentool","owner":"idlesign","description":"The tool to work with torrent files.","archived":false,"fork":false,"pushed_at":"2023-06-08T13:39:33.000Z","size":264,"stargazers_count":154,"open_issues_count":8,"forks_count":30,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-29T20:07:19.273Z","etag":null,"topics":["bencode","python","torrent"],"latest_commit_sha":null,"homepage":"https://github.com/idlesign/torrentool","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/idlesign.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG","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}},"created_at":"2015-10-21T17:53:29.000Z","updated_at":"2025-03-23T06:33:15.000Z","dependencies_parsed_at":"2023-07-05T18:31:56.661Z","dependency_job_id":null,"html_url":"https://github.com/idlesign/torrentool","commit_stats":{"total_commits":117,"total_committers":4,"mean_commits":29.25,"dds":0.05128205128205132,"last_synced_commit":"48c5e480900714803035f74528bb18ca8d2cbb57"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idlesign%2Ftorrentool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idlesign%2Ftorrentool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idlesign%2Ftorrentool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idlesign%2Ftorrentool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idlesign","download_url":"https://codeload.github.com/idlesign/torrentool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247399877,"owners_count":20932876,"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":["bencode","python","torrent"],"created_at":"2024-08-04T04:03:00.130Z","updated_at":"2025-04-05T21:08:07.865Z","avatar_url":"https://github.com/idlesign.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"torrentool\n==========\nhttps://github.com/idlesign/torrentool\n\n.. image:: https://img.shields.io/pypi/v/torrentool.svg\n    :target: https://pypi.python.org/pypi/torrentool\n\n.. image:: https://img.shields.io/pypi/l/torrentool.svg\n    :target: https://pypi.python.org/pypi/torrentool\n\n.. image:: https://img.shields.io/coveralls/idlesign/torrentool/master.svg\n    :target: https://coveralls.io/r/idlesign/torrentool\n\n\nDescription\n-----------\n\n*The tool to work with torrent files.*\n\nWorks on Python 3.7+.\n\nIncludes:\n\n* Command line interface. Requires ``click`` package to be installed.\n\n  Use ``pip install torrentool[cli]`` to install this dependency automatically.\n* Torrent utils (file creation, read and modification).\n* Bencoding utils (decoder, encoder).\n\n\nUsing CLI\n~~~~~~~~~\n\n.. code-block:: bash\n\n    ; Make .torrent out of `video.mkv`\n    $ torrentool torrent create /home/my/files_here/video.mkv\n\n    ; Make .torrent out of entire `/home/my/files_here` dir,\n    ; and put some open trackers announce URLs into it,\n    ; and publish file on torrent caching service, so it is ready to share.\n    $ torrentool torrent create /home/my/files_here --open_trackers --cache\n\n    ; Print out existing file info.\n    $ torrentool torrent info /home/my/some.torrent\n\n\nUse command line ``--help`` switch to know more.\n\n.. note:: Some commands require ``requests`` package to be installed.\n\n\nFrom your Python code\n~~~~~~~~~~~~~~~~~~~~~\n\n.. code-block:: python\n\n    from torrentool.api import Torrent\n\n    # Reading and modifying an existing file.\n    my_torrent = Torrent.from_file('/home/idle/some.torrent')\n    my_torrent.total_size  # Total files size in bytes.\n    my_torrent.magnet_link  # Magnet link for you.\n    my_torrent.comment = 'Your torrents are mine.'  # Set a comment.\n    my_torrent.to_file()  # Save changes.\n\n    # Or we can create a new torrent from a directory.\n    new_torrent = Torrent.create_from('/home/idle/my_stuff/')  # or it could have been a single file\n    new_torrent.announce_urls = 'udp://tracker.openbittorrent.com:80'\n    new_torrent.to_file('/home/idle/another.torrent')\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidlesign%2Ftorrentool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidlesign%2Ftorrentool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidlesign%2Ftorrentool/lists"}