class pysnow.client.Client(instance=None, host=None, user=None, password=None, raise_on_empty=None, request_params=None, use_ssl=True, session=None)[source]

User-created Client object.

  • instance – Instance name, used to construct host
  • host – Host can be passed as an alternative to instance
  • user – User name
  • password – Password
  • raise_on_empty – Whether or not to raise an exception on 404 (no matching records), defaults to True
  • request_params – Request params to send with requests globally (deprecated)
  • use_ssl – Enable or disable the use of SSL, defaults to True
  • session – Optional requests.Session object to use instead of passing user/pass to Client
  • InvalidUsage: On argument validation error
resource(api_path=None, base_path='/api/now', chunk_size=None)[source]

Creates a new Resource object after validating paths

  • api_path – Path to the API to operate on
  • base_path – (optional) Base path override
  • chunk_size – Response stream parser chunk size (in bytes)

Resource object

  • InvalidUsage: If a path fails validation