+ +
+

pyams_utils.protocol package

+
+

Module contents

+
+
+

Submodules

+
+

pyams_utils.protocol.http module

+
+
+class pyams_utils.protocol.http.HTTPClient(method, protocol, servername, url, params={}, credentials=(), proxy=(), rdns=True, proxy_auth=(), timeout=None, headers={})
+

Bases: object

+

HTTP client with proxy support

+
+
+get_response()
+

Common HTTP request

+
+ +
+ +
+
+pyams_utils.protocol.http.get_client(method, protocol, servername, url, params={}, credentials=(), proxy=(), rdns=True, proxy_auth=(), timeout=None, headers={})
+

HTTP client factory

+
+ +
+
+pyams_utils.protocol.http.get_client_from_url(url, credentials=(), proxy=(), rdns=True, proxy_auth=(), timeout=None, headers={})
+

HTTP client factory from URL

+
+ +
+
+

pyams_utils.protocol.xmlrpc module

+
+
+class pyams_utils.protocol.xmlrpc.SecureXMLRPCCookieAuthTransport(user_agent, credentials=(), cookies=None, timeout=<object object>, headers=None)
+

Bases: pyams_utils.protocol.xmlrpc.XMLRPCCookieAuthTransport

+

Secure XML-RPC transport

+
+ +
+
+class pyams_utils.protocol.xmlrpc.XMLRPCCookieAuthTransport(user_agent, credentials=(), cookies=None, timeout=<object object>, headers=None)
+

Bases: xmlrpc.client.Transport

+

An XML-RPC transport handling authentication via cookies

+
+
+class CookieRequest(url, data=None, headers={}, origin_req_host=None, unverifiable=False, method=None)
+

Bases: urllib.request.Request

+
+ +
+
+class CookieResponse(response)
+

Bases: object

+
+
+info()
+
+ +
+ +
+
+class CookieResponseHelper(response)
+

Bases: object

+
+
+getheaders(header)
+
+ +
+ +
+
+get_response(connection, host, handler)
+
+ +
+
+make_connection(host)
+
+ +
+
+request(host, handler, request_body, verbose=False)
+
+ +
+
+send_auth(connection)
+
+ +
+
+send_content_type(connection)
+
+ +
+
+send_headers(connection, headers)
+
+ +
+
+send_request(host, handler, request_body, debug)
+
+ +
+
+send_user_agent(connection)
+
+ +
+
+verbose = False
+
+ +
+ +
+
+pyams_utils.protocol.xmlrpc.get_client(uri, credentials=(), verbose=False, allow_none=0, timeout=<object object>, headers=None)
+

Get an XML-RPC client which supports basic authentication

+
+ +
+
+pyams_utils.protocol.xmlrpc.get_client_with_cookies(uri, credentials=(), verbose=False, allow_none=0, timeout=<object object>, headers=None, cookies=None)
+

Get an XML-RPC client which supports authentication through cookies

+
+ +
+
+
+ + +