torrentool


Nametorrentool JSON
Version 1.2.0 PyPI version JSON
download
home_pagehttps://github.com/idlesign/torrentool
SummaryThe tool to work with torrent files.
upload_time2023-06-08 13:39:41
maintainer
docs_urlNone
authorIgor `idle sign` Starikov
requires_python
licenseBSD 3-Clause License
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            torrentool
==========
https://github.com/idlesign/torrentool

.. image:: https://img.shields.io/pypi/v/torrentool.svg
    :target: https://pypi.python.org/pypi/torrentool

.. image:: https://img.shields.io/pypi/l/torrentool.svg
    :target: https://pypi.python.org/pypi/torrentool

.. image:: https://img.shields.io/coveralls/idlesign/torrentool/master.svg
    :target: https://coveralls.io/r/idlesign/torrentool


Description
-----------

*The tool to work with torrent files.*

Works on Python 3.7+.

Includes:

* Command line interface. Requires ``click`` package to be installed.

  Use ``pip install torrentool[cli]`` to install this dependency automatically.
* Torrent utils (file creation, read and modification).
* Bencoding utils (decoder, encoder).


Using CLI
~~~~~~~~~

.. code-block:: bash

    ; Make .torrent out of `video.mkv`
    $ torrentool torrent create /home/my/files_here/video.mkv

    ; Make .torrent out of entire `/home/my/files_here` dir,
    ; and put some open trackers announce URLs into it,
    ; and publish file on torrent caching service, so it is ready to share.
    $ torrentool torrent create /home/my/files_here --open_trackers --cache

    ; Print out existing file info.
    $ torrentool torrent info /home/my/some.torrent


Use command line ``--help`` switch to know more.

.. note:: Some commands require ``requests`` package to be installed.


From your Python code
~~~~~~~~~~~~~~~~~~~~~

.. code-block:: python

    from torrentool.api import Torrent

    # Reading and modifying an existing file.
    my_torrent = Torrent.from_file('/home/idle/some.torrent')
    my_torrent.total_size  # Total files size in bytes.
    my_torrent.magnet_link  # Magnet link for you.
    my_torrent.comment = 'Your torrents are mine.'  # Set a comment.
    my_torrent.to_file()  # Save changes.

    # Or we can create a new torrent from a directory.
    new_torrent = Torrent.create_from('/home/idle/my_stuff/')  # or it could have been a single file
    new_torrent.announce_urls = 'udp://tracker.openbittorrent.com:80'
    new_torrent.to_file('/home/idle/another.torrent')




            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/idlesign/torrentool",
    "name": "torrentool",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Igor `idle sign` Starikov",
    "author_email": "idlesign@yandex.ru",
    "download_url": "https://files.pythonhosted.org/packages/f7/67/a2aa492be0207f89952fa766005893e304aaf9971336cd2a8a7a79d3ff9c/torrentool-1.2.0.tar.gz",
    "platform": null,
    "description": "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\n\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause License",
    "summary": "The tool to work with torrent files.",
    "version": "1.2.0",
    "project_urls": {
        "Homepage": "https://github.com/idlesign/torrentool"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "af5c3170e7d18043ee996e9b069994419eacbec5683bf0fb7c0d4d41cb069365",
                "md5": "73394a6a3daaf802e5a38cfea8dc2950",
                "sha256": "bc6c55622e23978cf3c1e4aaf8f087971d75608c15b83be5a2c029464d3dd803"
            },
            "downloads": -1,
            "filename": "torrentool-1.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "73394a6a3daaf802e5a38cfea8dc2950",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 13021,
            "upload_time": "2023-06-08T13:39:35",
            "upload_time_iso_8601": "2023-06-08T13:39:35.431227Z",
            "url": "https://files.pythonhosted.org/packages/af/5c/3170e7d18043ee996e9b069994419eacbec5683bf0fb7c0d4d41cb069365/torrentool-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f767a2aa492be0207f89952fa766005893e304aaf9971336cd2a8a7a79d3ff9c",
                "md5": "c7959ef6d8b406600d4ed530e885bd7f",
                "sha256": "72cdd049eaf856ddc907d1d61527764ef0288512087d93a49267e00c4033c429"
            },
            "downloads": -1,
            "filename": "torrentool-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "c7959ef6d8b406600d4ed530e885bd7f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 533670,
            "upload_time": "2023-06-08T13:39:41",
            "upload_time_iso_8601": "2023-06-08T13:39:41.919994Z",
            "url": "https://files.pythonhosted.org/packages/f7/67/a2aa492be0207f89952fa766005893e304aaf9971336cd2a8a7a79d3ff9c/torrentool-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-08 13:39:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "idlesign",
    "github_project": "torrentool",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "torrentool"
}
        
Elapsed time: 0.07589s