Code Documentation

Backscatter Interface

class backscatter.Backscatter(api_key, version='v0', log_level=10, proxies=None, headers=None)[source]

Abstract interface for Backscatter.

_logger()[source]

Create a logger to be used between processes.

Returns:Logging instance.
_request(endpoint, params={}, data=None)[source]

Handle the requesting of information from the API.

enrich(query, query_type=None)[source]

Enrich a specific value with additional context.

Parameters:
  • query (str) – Value to search with
  • query_type (str) – Type of observation search to run
Returns:

Enrichment information for the query

Return type:

dict

get_observations(query, query_type=None, scope=None)[source]

Get observations based on a specific query value.

Parameters:
  • query (str) – Value to search with
  • query_type (str) – Type of observation search to run
  • scope (int) – Days of history to search back from today
Returns:

Listing of observations from Backscatter

Return type:

dict

Get observations based on a specific query value.

Parameters:
  • trend_type (str) – Type of trend return
  • scope (int) – Days of history to search back from today
Returns:

Listing of observations from Backscatter

Return type:

dict

set_log_level(level)[source]

Set the log level.