pyams_utils.protocol
package ⊞¶
pyams_utils.protocol.http
¶
PyAMS_utils.protocol.http module
This module provides an HTTP client class, which allows to easilly define proxies and authentication headers.
-
class
pyams_utils.protocol.http.
HTTPClient
(method, protocol, servername, url, params=None, credentials=(), proxy=(), rdns=True, proxy_auth=(), timeout=None, headers=None)[source]¶ Bases:
object
HTTP client with proxy support
Intialize HTTP connection
pyams_utils.protocol.tcp
¶
PyAMS_utils.protocol.tcp module
This module only provides a single function, used to know if a given TCP port is already in use
pyams_utils.protocol.xmlrpc
¶
PyAMS_utils.protocol.xmlrpc module
This module provides a few set of classes and functions usable to improve XML-RPC client usage.
It provides custom transports and allows storage of response cookies
-
class
pyams_utils.protocol.xmlrpc.
SecureXMLRPCCookieAuthTransport
(user_agent, credentials=(), cookies=None, timeout=<object object>, headers=None)[source]¶ 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)[source]¶ 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)[source]¶ Bases:
urllib.request.Request
Dummy request class used for extracting cookies
-
verbose
= False¶
-
class
-
pyams_utils.protocol.xmlrpc.
get_client
(uri, credentials=(), verbose=False, allow_none=0, timeout=<object object>, headers=None)[source]¶ Get an XML-RPC client which supports basic authentication
Get an XML-RPC client which supports authentication through cookies