connect.Client

connect.Client(self, *args, **kwargs)

Client connection for Posit Connect.

This class provides an interface to interact with the Posit Connect API, allowing for authentication, resource management, and data retrieval.

Parameters

Name Type Description Default
api_key str API key for authentication required
url str Sever API URL required

Attributes

Name Type Description
content Content Content resource.
me User Connect user resource.
metrics Metrics Metrics resource.
oauth OAuth OAuth resource.
tasks Tasks Tasks resource.
users Users Users resource.
version str Server version.

Methods

Name Description
request Send an HTTP request.
get Send a GET request.
post Send a POST request.
put Send a PUT request.
patch Send a PATCH request.
delete Send a DELETE request.

request

connect.Client.request(method, path, **kwargs)

Send an HTTP request.

A facade for requests.request configured for the target server.

Parameters

Name Type Description Default
method str The HTTP method to use for the request. required
path str Appended to the url object attribute. required
**kwargs Additional keyword arguments passed to requests.request. {}

Returns

Name Type Description
Response A requests.Response object.

get

connect.Client.get(path, **kwargs)

Send a GET request.

A facade for requests.get configured for the target server.

Parameters

Name Type Description Default
path str Appended to the configured base url. required
**kwargs Additional keyword arguments passed to requests.get. {}

Returns

Name Type Description
Response A requests.Response object.

post

connect.Client.post(path, **kwargs)

Send a POST request.

A facade for requests.post configured for the target server.

Parameters

Name Type Description Default
path str Appended to the configured base url. required
**kwargs Additional keyword arguments passed to requests.post. {}

Returns

Name Type Description
Response A requests.Response object.

put

connect.Client.put(path, **kwargs)

Send a PUT request.

A facade for requests.put configured for the target server.

Parameters

Name Type Description Default
path str Appended to the configured base url. required
**kwargs Additional keyword arguments passed to requests.put. {}

Returns

Name Type Description
Response A requests.Response object.

patch

connect.Client.patch(path, **kwargs)

Send a PATCH request.

A facade for requests.patch configured for the target server.

Parameters

Name Type Description Default
path str Appended to the configured base url. required
**kwargs Additional keyword arguments passed to requests.patch. {}

Returns

Name Type Description
Response A requests.Response object.

delete

connect.Client.delete(path, **kwargs)

Send a DELETE request.

A facade for requests.delete configured for the target server.

Parameters

Name Type Description Default
path str Appended to the configured base url. required
**kwargs Additional keyword arguments passed to requests.delete. {}

Returns

Name Type Description
Response A requests.Response object.