コード例 #1
0
ファイル: client.py プロジェクト: edavis/transmission-hq
    def __init__(self, url=None):
        """Create a new client instance.

        The url argument can be a TransmissionURL object or dict with any
        combination of the following keys:
            host, port, path, username, password, ssl
        """
        if url is None:
            url = TransmissionURL()
        Transmission.__init__(self, **url)
        self._cache = {}
        self._cache["session"] = TransmissionRPC("session", setter=self.session)
        self._cache["torrents"] = {}