opendp.prelude module#
The prelude
module provides shortcuts that reduce the number of import
statements needed to get started.
In most of our notebooks we begin with:
>>> import opendp.prelude as dp
>>> dp.enable_features("contrib")
After that we can refer to members of
mod
,
domains
,
metrics
,
measures
,
typing
,
accuracy
, and
context
using the shortcut.
Above, dp.enable_features
is an example:
Its full path is opendp.mod.enable_features()
.
In addition, three modules are distinctive and have shortcut submodules:
transformations
as t
,
measurements
as m
, and
combinators
as c
.
For example:
>>> type(dp.t.then_sum)
<class 'function'>
>>> type(dp.m.then_laplace)
<class 'function'>
>>> type(dp.c.make_basic_composition)
<class 'function'>