API Reference#
Tumult Analytics is a differentially private analytics library from Tumult Labs.
The library is broken up into a number of modules that enable complex differentially
private queries to be defined and run. A typical workflow is for users to instantiate
PySpark and read in their data; create a Session
object with
private datasets, their corresponding privacy protection, and a privacy budget; define
differentially private queries using a QueryBuilder
object,
and then evaluating these queries with evaluate()
.
For specifying privacy guarantees:
session
defines theSession
, an interactive interface for evaluating differentially private queries.privacy_budget
contains types for representing privacy budgets.protected_change
contains types for expressing what changes in input tables are protected by differential privacy.
For defining queries:
query_builder
provides an interface for constructing differentially private queries from basic query operations.keyset
definesKeySet
, a type for specifying the keys used in group-by operations.constraints
contains types for representing constraints used when evaluating queries on data with theAddRowsWithID
protected change.truncation_strategy
andbinning_spec
provide types that are used to define certain types of queries.
Modules#
A BinningSpec defines a binning operation on a column. |
|
Configuration for Tumult Analytics. |
|
Defines |
|
A KeySet specifies a list of values for one or more columns. |
|
Classes for specifying privacy budgets. |
|
Types for programmatically specifying what changes in input tables are protected. |
|
An API for building differentially private queries from basic operations. |
|
Interactive query evaluation using a differential privacy framework. |
|
Defines strategies for performing truncation in private joins. |
|
Utility functions. |
Exceptions#
- exception AnalyticsInternalError(message)#
Bases:
AssertionError
Generic error to raise for internal analytics errors.
- Parameters:
message (str)
This diagram shows the basic workflow for most Analytics operations. (Click to see full-size image.)