Session

Handles HTTP communication with the PACER Case Locator API.

class pacersdk.session.PCLSession(token_provider: Callable[[], str], config: dict, max_retries: int = 0, token: str | None = None)

Bases: object

A session wrapper for making authenticated POST requests to the API.

delete(path: str) dict

Perform an authenticated DELETE request.

Parameters:

path – URL path.

Returns:

JSON response.

get(path: str) dict

Perform an authenticated GET request.

Parameters:

path – URL path.

Returns:

JSON response.

post(path: str, body: dict) dict

Perform an authenticated POST request.

Parameters:
  • path – URL path.

  • data – Request body dictionary.

Returns:

JSON response.