File: index.rst

package info (click to toggle)
python-transmission-rpc 7.0.11-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 440 kB
  • sloc: python: 2,605; sh: 9; makefile: 4
file content (78 lines) | stat: -rw-r--r-- 1,819 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
.. transmission-rpc documentation master file, created by
    sphinx-quickstart on Fri Oct  5 09:29:21 2018.
    You can adapt this file completely to your liking, but it should at least
    contain the root `toctree` directive.

Welcome to transmission-rpc's documentation!
============================================

:code:`transmission-rpc` is a python3 library
to help your control your transmission daemon remotely.

quick start
-------------------------

.. literalinclude:: examples/quick-start.py

.. seealso::

   :py:meth:`transmission_rpc.Client.add_torrent`

Example
=======

Filter files

.. literalinclude:: examples/change_torrent_file.py

Move Torrent Data

.. literalinclude:: examples/move_torrent_data.py

Set Upload/Download Speed Limit

.. literalinclude:: examples/set_download_upload_speed.py

Arguments
-------------------

Each method has it own arguments.
You can pass arguments as kwargs when you call methods.

But in python, :code:`-` can't be used in a variable name,
so you need to replace :code:`-` with :code:`_`.

For example, :code:`torrent-add` method support arguments :code:`download-dir`,
you should call method like this.

.. code-block :: python

    from transmission_rpc import Client

    Client().add_torrent(torrent_url, download_dir='/path/to/download/dir')

:code:`transmission-rpc` will put
:code:`{"download-dir": "/path/to/download/dir"}` in arguments.


you can find rpc version by transmission version from
`transmission rpc docs <https://github.com/transmission/transmission/blob/main/docs/rpc-spec.md#5-protocol-versions>`_


.. toctree::
    :maxdepth: 2
    :caption: Contents:

    client.rst
    torrent.rst
    enum.rst
    session.rst
    errors.rst
    utils.rst

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`