opendp 0.9.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- opendp-0.9.2/MANIFEST.in +1 -0
- opendp-0.9.2/PKG-INFO +101 -0
- opendp-0.9.2/README.md +70 -0
- opendp-0.9.2/pyproject.toml +11 -0
- opendp-0.9.2/setup.cfg +55 -0
- opendp-0.9.2/setup.py +25 -0
- opendp-0.9.2/src/opendp/__init__.py +1 -0
- opendp-0.9.2/src/opendp/_convert.py +660 -0
- opendp-0.9.2/src/opendp/_data.py +450 -0
- opendp-0.9.2/src/opendp/_extrinsics/__init__.py +4 -0
- opendp-0.9.2/src/opendp/_extrinsics/_make_np_count/__init__.py +33 -0
- opendp-0.9.2/src/opendp/_extrinsics/_make_np_eigendecomposition/__init__.py +70 -0
- opendp-0.9.2/src/opendp/_extrinsics/_make_np_eigenvalues/__init__.py +50 -0
- opendp-0.9.2/src/opendp/_extrinsics/_make_np_eigenvector/__init__.py +207 -0
- opendp-0.9.2/src/opendp/_extrinsics/_make_np_mean/__init__.py +59 -0
- opendp-0.9.2/src/opendp/_extrinsics/_make_np_sscp/__init__.py +67 -0
- opendp-0.9.2/src/opendp/_extrinsics/_make_np_sum/__init__.py +49 -0
- opendp-0.9.2/src/opendp/_extrinsics/_test.py +18 -0
- opendp-0.9.2/src/opendp/_extrinsics/_utilities.py +78 -0
- opendp-0.9.2/src/opendp/_extrinsics/domains/__init__.py +206 -0
- opendp-0.9.2/src/opendp/_extrinsics/make_np_clamp/__init__.py +60 -0
- opendp-0.9.2/src/opendp/_extrinsics/make_np_pca/__init__.py +183 -0
- opendp-0.9.2/src/opendp/_extrinsics/sklearn/__init__.py +1 -0
- opendp-0.9.2/src/opendp/_extrinsics/sklearn/pca.py +134 -0
- opendp-0.9.2/src/opendp/_lib.py +412 -0
- opendp-0.9.2/src/opendp/accuracy.py +331 -0
- opendp-0.9.2/src/opendp/combinators.py +439 -0
- opendp-0.9.2/src/opendp/context.py +867 -0
- opendp-0.9.2/src/opendp/core.py +871 -0
- opendp-0.9.2/src/opendp/domains.py +528 -0
- opendp-0.9.2/src/opendp/measurements.py +1223 -0
- opendp-0.9.2/src/opendp/measures.py +280 -0
- opendp-0.9.2/src/opendp/metrics.py +433 -0
- opendp-0.9.2/src/opendp/mod.py +1078 -0
- opendp-0.9.2/src/opendp/polars.py +385 -0
- opendp-0.9.2/src/opendp/prelude.py +52 -0
- opendp-0.9.2/src/opendp/py.typed +0 -0
- opendp-0.9.2/src/opendp/rust/Cargo.toml +127 -0
- opendp-0.9.2/src/opendp/rust/build/derive.rs +193 -0
- opendp-0.9.2/src/opendp/rust/build/main.rs +7 -0
- opendp-0.9.2/src/opendp/rust/katex.html +26 -0
- opendp-0.9.2/src/opendp/rust/opendp_derive/Cargo.toml +25 -0
- opendp-0.9.2/src/opendp/rust/opendp_derive/src/full.rs +105 -0
- opendp-0.9.2/src/opendp/rust/opendp_derive/src/lib.rs +354 -0
- opendp-0.9.2/src/opendp/rust/opendp_tooling/Cargo.toml +19 -0
- opendp-0.9.2/src/opendp/rust/opendp_tooling/src/bootstrap/arguments.rs +224 -0
- opendp-0.9.2/src/opendp/rust/opendp_tooling/src/bootstrap/docstring.rs +389 -0
- opendp-0.9.2/src/opendp/rust/opendp_tooling/src/bootstrap/mod.rs +194 -0
- opendp-0.9.2/src/opendp/rust/opendp_tooling/src/bootstrap/partial.rs +124 -0
- opendp-0.9.2/src/opendp/rust/opendp_tooling/src/bootstrap/signature.rs +265 -0
- opendp-0.9.2/src/opendp/rust/opendp_tooling/src/codegen/mod.rs +161 -0
- opendp-0.9.2/src/opendp/rust/opendp_tooling/src/codegen/python.rs +622 -0
- opendp-0.9.2/src/opendp/rust/opendp_tooling/src/codegen/python_typemap.json +51 -0
- opendp-0.9.2/src/opendp/rust/opendp_tooling/src/codegen/r/c.rs +435 -0
- opendp-0.9.2/src/opendp/rust/opendp_tooling/src/codegen/r/mod.rs +94 -0
- opendp-0.9.2/src/opendp/rust/opendp_tooling/src/codegen/r/r.rs +637 -0
- opendp-0.9.2/src/opendp/rust/opendp_tooling/src/codegen/type_hierarchy.json +6 -0
- opendp-0.9.2/src/opendp/rust/opendp_tooling/src/lib.rs +87 -0
- opendp-0.9.2/src/opendp/rust/opendp_tooling/src/proven/filesystem.rs +137 -0
- opendp-0.9.2/src/opendp/rust/opendp_tooling/src/proven/mod.rs +68 -0
- opendp-0.9.2/src/opendp/rust/src/accuracy/accuracy_to_discrete_gaussian_scale.tex +27 -0
- opendp-0.9.2/src/opendp/rust/src/accuracy/accuracy_to_discrete_laplacian_scale.tex +30 -0
- opendp-0.9.2/src/opendp/rust/src/accuracy/discrete_gaussian_scale_to_accuracy.tex +66 -0
- opendp-0.9.2/src/opendp/rust/src/accuracy/discrete_laplacian_scale_to_accuracy.tex +57 -0
- opendp-0.9.2/src/opendp/rust/src/accuracy/ffi.rs +82 -0
- opendp-0.9.2/src/opendp/rust/src/accuracy/mod.rs +280 -0
- opendp-0.9.2/src/opendp/rust/src/accuracy/test.rs +327 -0
- opendp-0.9.2/src/opendp/rust/src/combinators/amplify/ffi.rs +117 -0
- opendp-0.9.2/src/opendp/rust/src/combinators/amplify/mod.rs +116 -0
- opendp-0.9.2/src/opendp/rust/src/combinators/amplify/test.rs +21 -0
- opendp-0.9.2/src/opendp/rust/src/combinators/chain/ffi.rs +173 -0
- opendp-0.9.2/src/opendp/rust/src/combinators/chain/mod.rs +199 -0
- opendp-0.9.2/src/opendp/rust/src/combinators/chain/shr/mod.rs +214 -0
- opendp-0.9.2/src/opendp/rust/src/combinators/chain/shr/partials.rs +294 -0
- opendp-0.9.2/src/opendp/rust/src/combinators/chain/test.rs +120 -0
- opendp-0.9.2/src/opendp/rust/src/combinators/fix_delta/ffi.rs +77 -0
- opendp-0.9.2/src/opendp/rust/src/combinators/fix_delta/mod.rs +69 -0
- opendp-0.9.2/src/opendp/rust/src/combinators/measure_cast/mod.rs +11 -0
- opendp-0.9.2/src/opendp/rust/src/combinators/measure_cast/pureDP_to_fixed_approxDP/ffi.rs +54 -0
- opendp-0.9.2/src/opendp/rust/src/combinators/measure_cast/pureDP_to_fixed_approxDP/mod.rs +39 -0
- opendp-0.9.2/src/opendp/rust/src/combinators/measure_cast/pureDP_to_zCDP/ffi.rs +56 -0
- opendp-0.9.2/src/opendp/rust/src/combinators/measure_cast/pureDP_to_zCDP/mod.rs +46 -0
- opendp-0.9.2/src/opendp/rust/src/combinators/measure_cast/zCDP_to_approxDP/cdp_epsilon.py +47 -0
- opendp-0.9.2/src/opendp/rust/src/combinators/measure_cast/zCDP_to_approxDP/cdp_epsilon.rs +119 -0
- opendp-0.9.2/src/opendp/rust/src/combinators/measure_cast/zCDP_to_approxDP/cdp_epsilon.tex +218 -0
- opendp-0.9.2/src/opendp/rust/src/combinators/measure_cast/zCDP_to_approxDP/ffi.rs +58 -0
- opendp-0.9.2/src/opendp/rust/src/combinators/measure_cast/zCDP_to_approxDP/mod.bib +18 -0
- opendp-0.9.2/src/opendp/rust/src/combinators/measure_cast/zCDP_to_approxDP/mod.rs +47 -0
- opendp-0.9.2/src/opendp/rust/src/combinators/mod.rs +29 -0
- opendp-0.9.2/src/opendp/rust/src/combinators/sequential_compositor/interactive/ffi.rs +160 -0
- opendp-0.9.2/src/opendp/rust/src/combinators/sequential_compositor/interactive/mod.rs +203 -0
- opendp-0.9.2/src/opendp/rust/src/combinators/sequential_compositor/interactive/test.rs +79 -0
- opendp-0.9.2/src/opendp/rust/src/combinators/sequential_compositor/mod.rs +9 -0
- opendp-0.9.2/src/opendp/rust/src/combinators/sequential_compositor/noninteractive/ffi.rs +146 -0
- opendp-0.9.2/src/opendp/rust/src/combinators/sequential_compositor/noninteractive/mod.rs +141 -0
- opendp-0.9.2/src/opendp/rust/src/combinators/sequential_compositor/noninteractive/test.rs +59 -0
- opendp-0.9.2/src/opendp/rust/src/combinators/test.rs +36 -0
- opendp-0.9.2/src/opendp/rust/src/core/ffi.rs +958 -0
- opendp-0.9.2/src/opendp/rust/src/core/mod.rs +474 -0
- opendp-0.9.2/src/opendp/rust/src/core/test.rs +44 -0
- opendp-0.9.2/src/opendp/rust/src/data/ffi/mod.rs +1190 -0
- opendp-0.9.2/src/opendp/rust/src/data/ffi/polars.rs +55 -0
- opendp-0.9.2/src/opendp/rust/src/data/mod.rs +103 -0
- opendp-0.9.2/src/opendp/rust/src/data/test.rs +21 -0
- opendp-0.9.2/src/opendp/rust/src/domains/code/atom_domain.R +1 -0
- opendp-0.9.2/src/opendp/rust/src/domains/code/atom_domain.rst +2 -0
- opendp-0.9.2/src/opendp/rust/src/domains/ffi.rs +439 -0
- opendp-0.9.2/src/opendp/rust/src/domains/mod.rs +582 -0
- opendp-0.9.2/src/opendp/rust/src/domains/polars/expr/ffi.rs +78 -0
- opendp-0.9.2/src/opendp/rust/src/domains/polars/expr/mod.rs +267 -0
- opendp-0.9.2/src/opendp/rust/src/domains/polars/frame/ffi.rs +197 -0
- opendp-0.9.2/src/opendp/rust/src/domains/polars/frame/mod.rs +367 -0
- opendp-0.9.2/src/opendp/rust/src/domains/polars/frame/test.rs +41 -0
- opendp-0.9.2/src/opendp/rust/src/domains/polars/mod.rs +8 -0
- opendp-0.9.2/src/opendp/rust/src/domains/polars/series/ffi.rs +106 -0
- opendp-0.9.2/src/opendp/rust/src/domains/polars/series/mod.rs +268 -0
- opendp-0.9.2/src/opendp/rust/src/domains/polars/series/test.rs +73 -0
- opendp-0.9.2/src/opendp/rust/src/domains/poly.rs +81 -0
- opendp-0.9.2/src/opendp/rust/src/error/mod.rs +218 -0
- opendp-0.9.2/src/opendp/rust/src/error/test.rs +18 -0
- opendp-0.9.2/src/opendp/rust/src/ffi/any.rs +739 -0
- opendp-0.9.2/src/opendp/rust/src/ffi/dispatch.rs +181 -0
- opendp-0.9.2/src/opendp/rust/src/ffi/mod.rs +113 -0
- opendp-0.9.2/src/opendp/rust/src/ffi/util.rs +518 -0
- opendp-0.9.2/src/opendp/rust/src/interactive/mod.rs +292 -0
- opendp-0.9.2/src/opendp/rust/src/lib.rs +192 -0
- opendp-0.9.2/src/opendp/rust/src/lib.sty +184 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/alp/ffi.rs +89 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/alp/mod.rs +420 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/alp/test.rs +215 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/code/README.md +23 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/code/make_gaussian.R +22 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/code/make_gaussian.rst +11 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/code/make_geometric.rst +11 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/code/make_laplace.rst +12 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/code/make_private_lazyframe.rst +63 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/code/make_randomized_response.rst +4 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/code/make_randomized_response_bool.rst +4 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/code/make_report_noisy_max_gumbel.rst +11 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/code/make_user_measurement.rst +15 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/code/then_report_noisy_max_gumbel.rst +5 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/gaussian/ffi.rs +187 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/gaussian/float/mod.rs +112 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/gaussian/float/test.rs +33 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/gaussian/integer/mod.rs +123 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/gaussian/integer/test.rs +41 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/gaussian/mod.rs +223 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/gaussian/test.rs +38 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/geometric/ffi.rs +83 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/geometric/integer/mod.rs +115 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/geometric/integer/test.rs +65 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/geometric/mod.rs +121 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/gumbel_max/ffi.rs +59 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/gumbel_max/make_report_noisy_max_gumbel.tex +258 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/gumbel_max/mod.rs +166 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/gumbel_max/pseudocode/make_report_noisy_max_gumbel.py +52 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/gumbel_max/references.bib +36 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/gumbel_max/test.rs +40 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/laplace/ffi.rs +171 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/laplace/float/mod.rs +126 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/laplace/float/test.rs +58 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/laplace/integer/mod.rs +116 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/laplace/integer/test.rs +31 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/laplace/mod.rs +182 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/laplace/test.rs +19 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/laplace_threshold/ffi.rs +71 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/laplace_threshold/mod.rs +152 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/laplace_threshold/test.rs +25 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/make_private_expr/expr_index_candidates/mod.rs +237 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/make_private_expr/expr_index_candidates/test.rs +71 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/make_private_expr/expr_len/mod.rs +72 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/make_private_expr/expr_len/test.rs +60 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/make_private_expr/expr_literal/mod.rs +44 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/make_private_expr/expr_literal/test.rs +52 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/make_private_expr/expr_noise/mod.rs +346 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/make_private_expr/expr_noise/test.rs +135 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/make_private_expr/expr_postprocess/mod.rs +106 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/make_private_expr/expr_postprocess/test.rs +61 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/make_private_expr/expr_report_noisy_max_gumbel/mod.rs +318 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/make_private_expr/expr_report_noisy_max_gumbel/test.rs +92 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/make_private_expr/ffi.rs +68 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/make_private_expr/mod.rs +185 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/make_private_lazyframe/aggregate/mod.rs +153 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/make_private_lazyframe/aggregate/test.rs +42 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/make_private_lazyframe/ffi.rs +75 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/make_private_lazyframe/mod.rs +145 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/make_private_lazyframe/postprocess/mod.rs +56 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/make_private_lazyframe/postprocess/test.rs +41 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/make_private_lazyframe/select/mod.rs +132 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/make_private_lazyframe/select/test.rs +83 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/make_user_measurement/mod.rs +79 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/mod.rs +54 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/randomized_response/ffi.rs +72 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/randomized_response/make_randomized_response_bool.tex +131 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/randomized_response/mod.rs +171 -0
- opendp-0.9.2/src/opendp/rust/src/measurements/randomized_response/test.rs +50 -0
- opendp-0.9.2/src/opendp/rust/src/measures/ffi.rs +238 -0
- opendp-0.9.2/src/opendp/rust/src/measures/mod.rs +218 -0
- opendp-0.9.2/src/opendp/rust/src/metrics/ffi.rs +318 -0
- opendp-0.9.2/src/opendp/rust/src/metrics/mod.rs +657 -0
- opendp-0.9.2/src/opendp/rust/src/polars/mod.rs +433 -0
- opendp-0.9.2/src/opendp/rust/src/traits/arithmetic/mod.rs +645 -0
- opendp-0.9.2/src/opendp/rust/src/traits/bounded/mod.rs +16 -0
- opendp-0.9.2/src/opendp/rust/src/traits/cast/mod.rs +485 -0
- opendp-0.9.2/src/opendp/rust/src/traits/cast/test.rs +60 -0
- opendp-0.9.2/src/opendp/rust/src/traits/mod.rs +301 -0
- opendp-0.9.2/src/opendp/rust/src/traits/operations/mod.rs +395 -0
- opendp-0.9.2/src/opendp/rust/src/traits/operations/test.rs +14 -0
- opendp-0.9.2/src/opendp/rust/src/traits/samplers/bernoulli/mod.rs +140 -0
- opendp-0.9.2/src/opendp/rust/src/traits/samplers/bernoulli/pseudocode/sample_bernoulli_float.py +43 -0
- opendp-0.9.2/src/opendp/rust/src/traits/samplers/bernoulli/pseudocode/sample_bernoulli_rational.py +5 -0
- opendp-0.9.2/src/opendp/rust/src/traits/samplers/bernoulli/sample_bernoulli_float.tex +110 -0
- opendp-0.9.2/src/opendp/rust/src/traits/samplers/bernoulli/sample_bernoulli_rational.tex +71 -0
- opendp-0.9.2/src/opendp/rust/src/traits/samplers/bernoulli/test.rs +20 -0
- opendp-0.9.2/src/opendp/rust/src/traits/samplers/cks20/mod.bib +35 -0
- opendp-0.9.2/src/opendp/rust/src/traits/samplers/cks20/mod.rs +200 -0
- opendp-0.9.2/src/opendp/rust/src/traits/samplers/cks20/sample_bernoulli_exp.tex +88 -0
- opendp-0.9.2/src/opendp/rust/src/traits/samplers/cks20/sample_bernoulli_exp1.tex +102 -0
- opendp-0.9.2/src/opendp/rust/src/traits/samplers/cks20/sample_discrete_gaussian.tex +126 -0
- opendp-0.9.2/src/opendp/rust/src/traits/samplers/cks20/sample_discrete_laplace.tex +128 -0
- opendp-0.9.2/src/opendp/rust/src/traits/samplers/cks20/sample_geometric_exp_fast.tex +147 -0
- opendp-0.9.2/src/opendp/rust/src/traits/samplers/cks20/sample_geometric_exp_slow.tex +76 -0
- opendp-0.9.2/src/opendp/rust/src/traits/samplers/discretize/mod.rs +153 -0
- opendp-0.9.2/src/opendp/rust/src/traits/samplers/discretize/test.rs +160 -0
- opendp-0.9.2/src/opendp/rust/src/traits/samplers/geometric/mod.rs +235 -0
- opendp-0.9.2/src/opendp/rust/src/traits/samplers/geometric/sample_geometric_buffer.tex +59 -0
- opendp-0.9.2/src/opendp/rust/src/traits/samplers/geometric/test.rs +43 -0
- opendp-0.9.2/src/opendp/rust/src/traits/samplers/mod.rs +113 -0
- opendp-0.9.2/src/opendp/rust/src/traits/samplers/psrn/mod.rs +148 -0
- opendp-0.9.2/src/opendp/rust/src/traits/samplers/psrn/test.rs +32 -0
- opendp-0.9.2/src/opendp/rust/src/traits/samplers/test.rs +60 -0
- opendp-0.9.2/src/opendp/rust/src/traits/samplers/uniform/SampleUniformIntBelow.tex +135 -0
- opendp-0.9.2/src/opendp/rust/src/traits/samplers/uniform/mod.rs +235 -0
- opendp-0.9.2/src/opendp/rust/src/traits/samplers/uniform/pseudocode/sample_uniform_int_below_native.py +19 -0
- opendp-0.9.2/src/opendp/rust/src/traits/samplers/uniform/pseudocode/sample_uniform_int_below_ubig.py +24 -0
- opendp-0.9.2/src/opendp/rust/src/traits/samplers/uniform/test.rs +57 -0
- opendp-0.9.2/src/opendp/rust/src/trans/manipulation/make_is_equal.tex +84 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/b_ary_tree/consistency_postprocessor/ffi.rs +32 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/b_ary_tree/consistency_postprocessor/mod.rs +126 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/b_ary_tree/ffi.rs +74 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/b_ary_tree/mod.rs +145 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/b_ary_tree/test.rs +120 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/cast/ffi.rs +177 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/cast/mod.rs +126 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/cast/test.rs +145 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/cast_metric/ffi.rs +171 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/cast_metric/mod.rs +169 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/cast_metric/test.rs +29 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/cast_metric/traits.rs +47 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/clamp/ffi.rs +66 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/clamp/make_clamp.tex +86 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/clamp/mod.rs +57 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/clamp/test.rs +17 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/count/ffi.rs +195 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/count/make_count.tex +145 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/count/mod.rs +266 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/count/test.rs +65 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/count_cdf/ffi.rs +65 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/count_cdf/mod.rs +236 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/count_cdf/test.rs +71 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/covariance/ffi.rs +68 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/covariance/mod.rs +120 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/covariance/test.rs +23 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/dataframe/apply/ffi.rs +171 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/dataframe/apply/mod.rs +155 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/dataframe/apply/test.rs +57 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/dataframe/create/ffi.rs +109 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/dataframe/create/mod.rs +217 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/dataframe/create/test.rs +77 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/dataframe/mod.rs +58 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/dataframe/select/ffi.rs +34 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/dataframe/select/mod.rs +57 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/dataframe/select/test.rs +22 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/dataframe/subset/ffi.rs +78 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/dataframe/subset/mod.rs +63 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/dataframe/subset/test.rs +22 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/impute/ffi.rs +206 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/impute/mod.rs +239 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/impute/test.rs +75 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/index/ffi.rs +125 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/index/mod.rs +155 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/index/test.rs +45 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/lipschitz_mul/ffi.rs +65 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/lipschitz_mul/mod.rs +134 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/lipschitz_mul/test.rs +10 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_expr/expr_alias/mod.rs +77 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_expr/expr_alias/test.rs +88 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_expr/expr_binary/mod.rs +83 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_expr/expr_binary/test.rs +287 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_expr/expr_boolean_function/mod.rs +109 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_expr/expr_boolean_function/test.rs +238 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_expr/expr_clip/mod.rs +117 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_expr/expr_clip/test.rs +35 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_expr/expr_col/mod.rs +51 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_expr/expr_col/test.rs +51 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_expr/expr_discrete_quantile_score/mod.rs +183 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_expr/expr_discrete_quantile_score/plugin_dq_score.rs +218 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_expr/expr_discrete_quantile_score/test.rs +90 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_expr/expr_fill_nan/mod.rs +144 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_expr/expr_fill_nan/test.rs +34 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_expr/expr_fill_null/mod.rs +108 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_expr/expr_fill_null/test.rs +31 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_expr/expr_len/mod.rs +93 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_expr/expr_len/test.rs +87 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_expr/expr_lit/mod.rs +69 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_expr/expr_lit/test.rs +33 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_expr/expr_sum/mod.rs +216 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_expr/expr_sum/test.rs +132 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_expr/ffi.rs +28 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_expr/mod.rs +201 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_expr/test_helper.rs +50 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_lazyframe/ffi.rs +25 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_lazyframe/filter/mod.rs +72 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_lazyframe/filter/test.rs +59 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_lazyframe/h_stack/mod.rs +107 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_lazyframe/h_stack/test.rs +62 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_lazyframe/mod.rs +100 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_stable_lazyframe/source/mod.rs +58 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/make_user_transformation/mod.rs +55 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/manipulation/ffi.rs +179 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/manipulation/make_row_by_row.tex +72 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/manipulation/make_row_by_row_fallible.tex +114 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/manipulation/mod.rs +225 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/manipulation/test.rs +51 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/mean/ffi.rs +69 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/mean/mod.rs +59 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/mean/test.rs +18 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/mod.rs +109 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/quantile_score_candidates/compute_score.tex +64 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/quantile_score_candidates/ffi.rs +50 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/quantile_score_candidates/make_quantile_score_candidates.tex +335 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/quantile_score_candidates/mod.rs +318 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/quantile_score_candidates/pseudocode/compute_score.py +27 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/quantile_score_candidates/pseudocode/make_quantile_score_candidates.py +44 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/quantile_score_candidates/references.bib +16 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/quantile_score_candidates/test.rs +167 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/resize/ffi.rs +101 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/resize/mod.rs +106 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/resize/test.rs +19 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/sum/ffi.rs +75 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/sum/float/checked/ffi.rs +120 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/sum/float/checked/mod.rs +298 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/sum/float/checked/test.rs +98 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/sum/float/mod.rs +57 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/sum/float/ordered/ffi.rs +121 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/sum/float/ordered/mod.rs +185 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/sum/float/ordered/test.rs +27 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/sum/int/checked/ffi.rs +57 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/sum/int/checked/mod.rs +72 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/sum/int/checked/test.rs +12 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/sum/int/mod.rs +38 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/sum/int/monotonic/ffi.rs +89 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/sum/int/monotonic/mod.rs +138 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/sum/int/monotonic/test.rs +30 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/sum/int/ordered/ffi.rs +88 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/sum/int/ordered/mod.rs +100 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/sum/int/ordered/test.rs +32 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/sum/int/split/ffi.rs +88 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/sum/int/split/mod.rs +136 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/sum/int/split/test.rs +33 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/sum/mod.rs +218 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/sum/test.rs +41 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/sum_of_squared_deviations/ffi.rs +56 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/sum_of_squared_deviations/mod.rs +123 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/sum_of_squared_deviations/test.rs +26 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/variance/ffi.rs +60 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/variance/mod.rs +82 -0
- opendp-0.9.2/src/opendp/rust/src/transformations/variance/test.rs +25 -0
- opendp-0.9.2/src/opendp/transformations.py +3520 -0
- opendp-0.9.2/src/opendp/typing.py +545 -0
- opendp-0.9.2/src/opendp.egg-info/PKG-INFO +101 -0
- opendp-0.9.2/src/opendp.egg-info/SOURCES.txt +395 -0
- opendp-0.9.2/src/opendp.egg-info/dependency_links.txt +1 -0
- opendp-0.9.2/src/opendp.egg-info/not-zip-safe +1 -0
- opendp-0.9.2/src/opendp.egg-info/requires.txt +16 -0
- opendp-0.9.2/src/opendp.egg-info/top_level.txt +1 -0
- opendp-0.9.2/test/test_accuracy.py +44 -0
- opendp-0.9.2/test/test_binary_search.py +69 -0
- opendp-0.9.2/test/test_comb.py +112 -0
- opendp-0.9.2/test/test_context_usability.py +90 -0
- opendp-0.9.2/test/test_convert.py +162 -0
- opendp-0.9.2/test/test_core.py +307 -0
- opendp-0.9.2/test/test_decorators.py +21 -0
- opendp-0.9.2/test/test_docs.py +22 -0
- opendp-0.9.2/test/test_interactive.py +102 -0
- opendp-0.9.2/test/test_meas.py +223 -0
- opendp-0.9.2/test/test_metric_cast.py +40 -0
- opendp-0.9.2/test/test_metrics.py +18 -0
- opendp-0.9.2/test/test_polars.py +379 -0
- opendp-0.9.2/test/test_space_of.py +49 -0
- opendp-0.9.2/test/test_subprocesses.py +16 -0
- opendp-0.9.2/test/test_tests.py +3 -0
- opendp-0.9.2/test/test_trans.py +393 -0
- opendp-0.9.2/test/test_typing.py +98 -0
- opendp-0.9.2/test/test_user_transform.py +136 -0
opendp-0.9.2/MANIFEST.in
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
recursive-include src/opendp/rust *
|
opendp-0.9.2/PKG-INFO
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: opendp
|
|
3
|
+
Version: 0.9.2
|
|
4
|
+
Summary: Python bindings for the OpenDP Library
|
|
5
|
+
Home-page: https://opendp.org
|
|
6
|
+
Author: The OpenDP Project
|
|
7
|
+
Author-email: info@opendp.org
|
|
8
|
+
Project-URL: Source, https://github.com/opendp/opendp
|
|
9
|
+
Project-URL: Issues, https://github.com/opendp/opendp/issues
|
|
10
|
+
Project-URL: Documentation, https://docs.opendp.org/
|
|
11
|
+
Keywords: differential privacy
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Requires-Python: >=3.9
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
License-File: ../LICENSE
|
|
18
|
+
Provides-Extra: numpy
|
|
19
|
+
Requires-Dist: numpy<2.0,>=1.17; extra == "numpy"
|
|
20
|
+
Requires-Dist: randomgen; extra == "numpy"
|
|
21
|
+
Provides-Extra: scikit-learn
|
|
22
|
+
Requires-Dist: scikit-learn; extra == "scikit-learn"
|
|
23
|
+
Requires-Dist: numpy<2.0,>=1.17; extra == "scikit-learn"
|
|
24
|
+
Requires-Dist: randomgen; extra == "scikit-learn"
|
|
25
|
+
Provides-Extra: polars
|
|
26
|
+
Requires-Dist: polars==0.20.16; extra == "polars"
|
|
27
|
+
Requires-Dist: pyarrow; extra == "polars"
|
|
28
|
+
Requires-Dist: scikit-learn; extra == "polars"
|
|
29
|
+
Requires-Dist: numpy<2.0,>=1.17; extra == "polars"
|
|
30
|
+
Requires-Dist: randomgen; extra == "polars"
|
|
31
|
+
|
|
32
|
+
# OpenDP
|
|
33
|
+
[](https://www.repostatus.org/#wip)
|
|
34
|
+
[](https://opensource.org/licenses/MIT)
|
|
35
|
+
|
|
36
|
+
[](https://docs.opendp.org/en/nightly/api/python/index.html)
|
|
37
|
+
[](https://docs.opendp.org/en/stable/api/r/)
|
|
38
|
+
[](https://docs.rs/crate/opendp/latest)
|
|
39
|
+
|
|
40
|
+
[](https://github.com/opendp/opendp/actions/workflows/smoke-test.yml?query=branch%3Amain)
|
|
41
|
+
[](https://github.com/opendp/opendp/actions/workflows/nightly.yml?query=branch%3Amain)
|
|
42
|
+
|
|
43
|
+
The OpenDP Library is a modular collection of statistical algorithms that adhere to the definition of
|
|
44
|
+
[differential privacy](https://en.wikipedia.org/wiki/Differential_privacy).
|
|
45
|
+
It can be used to build applications of privacy-preserving computations, using a number of different models of privacy.
|
|
46
|
+
OpenDP is implemented in Rust, with bindings for easy use from Python and R.
|
|
47
|
+
|
|
48
|
+
The architecture of the OpenDP Library is based on a conceptual framework for expressing privacy-aware computations.
|
|
49
|
+
This framework is described in the paper [A Programming Framework for OpenDP](https://projects.iq.harvard.edu/files/opendp/files/opendp_programming_framework_11may2020_1_01.pdf).
|
|
50
|
+
|
|
51
|
+
The OpenDP Library is part of the larger [OpenDP Project](https://opendp.org), a community effort to build trustworthy,
|
|
52
|
+
open source software tools for analysis of private data.
|
|
53
|
+
(For simplicity in these docs, when we refer to “OpenDP,” we mean just the library, not the entire project.)
|
|
54
|
+
|
|
55
|
+
## Status
|
|
56
|
+
|
|
57
|
+
OpenDP is under development, and we expect to [release new versions](https://github.com/opendp/opendp/releases) frequently,
|
|
58
|
+
incorporating feedback and code contributions from the OpenDP Community.
|
|
59
|
+
It's a work in progress, but it can already be used to build some applications and to prototype contributions that will expand its functionality.
|
|
60
|
+
We welcome you to try it and look forward to feedback on the library! However, please be aware of the following limitations:
|
|
61
|
+
|
|
62
|
+
> OpenDP, like all real-world software, has both known and unknown issues.
|
|
63
|
+
> If you intend to use OpenDP for a privacy-critical application, you should evaluate the impact of these issues on your use case.
|
|
64
|
+
>
|
|
65
|
+
> More details can be found in the [Limitations section of the User Guide](https://docs.opendp.org/en/stable/user/limitations.html).
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
## Installation
|
|
69
|
+
|
|
70
|
+
Install OpenDP for Python with `pip` (the [package installer for Python](https://pypi.org/project/pip/)):
|
|
71
|
+
|
|
72
|
+
$ pip install opendp
|
|
73
|
+
|
|
74
|
+
Install OpenDP for R from an R session:
|
|
75
|
+
|
|
76
|
+
install.packages("opendp", repos = "https://opendp.r-universe.dev")
|
|
77
|
+
|
|
78
|
+
More information can be found in the [Getting Started section of the User Guide](https://docs.opendp.org/en/stable/user/getting-started.html).
|
|
79
|
+
|
|
80
|
+
## Documentation
|
|
81
|
+
|
|
82
|
+
The full documentation for OpenDP is located at https://docs.opendp.org. Here are some helpful entry points:
|
|
83
|
+
|
|
84
|
+
* [User Guide](https://docs.opendp.org/en/stable/user/index.html)
|
|
85
|
+
* [Python API Docs](https://docs.opendp.org/en/stable/api/python/index.html)
|
|
86
|
+
* [Contributor Guide](https://docs.opendp.org/en/stable/contributor/index.html)
|
|
87
|
+
|
|
88
|
+
## Getting Help
|
|
89
|
+
|
|
90
|
+
If you're having problems using OpenDP, or want to submit feedback, please reach out! Here are some ways to contact us:
|
|
91
|
+
|
|
92
|
+
* Ask questions on our [discussions forum](https://github.com/opendp/opendp/discussions)
|
|
93
|
+
* Open issues on our [issue tracker](https://github.com/opendp/opendp/issues)
|
|
94
|
+
* Join our [Slack](https://join.slack.com/t/opendp/shared_invite/zt-zw7o1k2s-dHg8NQE8WTfAGFnN_cwomA)
|
|
95
|
+
* Send general queries to [info@opendp.org](mailto:info@opendp.org)
|
|
96
|
+
* Reach us on Twitter at [@opendp_org](https://twitter.com/opendp_org)
|
|
97
|
+
|
|
98
|
+
## Contributing
|
|
99
|
+
|
|
100
|
+
OpenDP is a community effort, and we welcome your contributions to its development!
|
|
101
|
+
If you'd like to participate, please contact us! We also have a [contribution process section in the Contributor Guide](https://docs.opendp.org/en/stable/contributor/contribution-process.html).
|
opendp-0.9.2/README.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# OpenDP
|
|
2
|
+
[](https://www.repostatus.org/#wip)
|
|
3
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
|
+
|
|
5
|
+
[](https://docs.opendp.org/en/nightly/api/python/index.html)
|
|
6
|
+
[](https://docs.opendp.org/en/stable/api/r/)
|
|
7
|
+
[](https://docs.rs/crate/opendp/latest)
|
|
8
|
+
|
|
9
|
+
[](https://github.com/opendp/opendp/actions/workflows/smoke-test.yml?query=branch%3Amain)
|
|
10
|
+
[](https://github.com/opendp/opendp/actions/workflows/nightly.yml?query=branch%3Amain)
|
|
11
|
+
|
|
12
|
+
The OpenDP Library is a modular collection of statistical algorithms that adhere to the definition of
|
|
13
|
+
[differential privacy](https://en.wikipedia.org/wiki/Differential_privacy).
|
|
14
|
+
It can be used to build applications of privacy-preserving computations, using a number of different models of privacy.
|
|
15
|
+
OpenDP is implemented in Rust, with bindings for easy use from Python and R.
|
|
16
|
+
|
|
17
|
+
The architecture of the OpenDP Library is based on a conceptual framework for expressing privacy-aware computations.
|
|
18
|
+
This framework is described in the paper [A Programming Framework for OpenDP](https://projects.iq.harvard.edu/files/opendp/files/opendp_programming_framework_11may2020_1_01.pdf).
|
|
19
|
+
|
|
20
|
+
The OpenDP Library is part of the larger [OpenDP Project](https://opendp.org), a community effort to build trustworthy,
|
|
21
|
+
open source software tools for analysis of private data.
|
|
22
|
+
(For simplicity in these docs, when we refer to “OpenDP,” we mean just the library, not the entire project.)
|
|
23
|
+
|
|
24
|
+
## Status
|
|
25
|
+
|
|
26
|
+
OpenDP is under development, and we expect to [release new versions](https://github.com/opendp/opendp/releases) frequently,
|
|
27
|
+
incorporating feedback and code contributions from the OpenDP Community.
|
|
28
|
+
It's a work in progress, but it can already be used to build some applications and to prototype contributions that will expand its functionality.
|
|
29
|
+
We welcome you to try it and look forward to feedback on the library! However, please be aware of the following limitations:
|
|
30
|
+
|
|
31
|
+
> OpenDP, like all real-world software, has both known and unknown issues.
|
|
32
|
+
> If you intend to use OpenDP for a privacy-critical application, you should evaluate the impact of these issues on your use case.
|
|
33
|
+
>
|
|
34
|
+
> More details can be found in the [Limitations section of the User Guide](https://docs.opendp.org/en/stable/user/limitations.html).
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
## Installation
|
|
38
|
+
|
|
39
|
+
Install OpenDP for Python with `pip` (the [package installer for Python](https://pypi.org/project/pip/)):
|
|
40
|
+
|
|
41
|
+
$ pip install opendp
|
|
42
|
+
|
|
43
|
+
Install OpenDP for R from an R session:
|
|
44
|
+
|
|
45
|
+
install.packages("opendp", repos = "https://opendp.r-universe.dev")
|
|
46
|
+
|
|
47
|
+
More information can be found in the [Getting Started section of the User Guide](https://docs.opendp.org/en/stable/user/getting-started.html).
|
|
48
|
+
|
|
49
|
+
## Documentation
|
|
50
|
+
|
|
51
|
+
The full documentation for OpenDP is located at https://docs.opendp.org. Here are some helpful entry points:
|
|
52
|
+
|
|
53
|
+
* [User Guide](https://docs.opendp.org/en/stable/user/index.html)
|
|
54
|
+
* [Python API Docs](https://docs.opendp.org/en/stable/api/python/index.html)
|
|
55
|
+
* [Contributor Guide](https://docs.opendp.org/en/stable/contributor/index.html)
|
|
56
|
+
|
|
57
|
+
## Getting Help
|
|
58
|
+
|
|
59
|
+
If you're having problems using OpenDP, or want to submit feedback, please reach out! Here are some ways to contact us:
|
|
60
|
+
|
|
61
|
+
* Ask questions on our [discussions forum](https://github.com/opendp/opendp/discussions)
|
|
62
|
+
* Open issues on our [issue tracker](https://github.com/opendp/opendp/issues)
|
|
63
|
+
* Join our [Slack](https://join.slack.com/t/opendp/shared_invite/zt-zw7o1k2s-dHg8NQE8WTfAGFnN_cwomA)
|
|
64
|
+
* Send general queries to [info@opendp.org](mailto:info@opendp.org)
|
|
65
|
+
* Reach us on Twitter at [@opendp_org](https://twitter.com/opendp_org)
|
|
66
|
+
|
|
67
|
+
## Contributing
|
|
68
|
+
|
|
69
|
+
OpenDP is a community effort, and we welcome your contributions to its development!
|
|
70
|
+
If you'd like to participate, please contact us! We also have a [contribution process section in the Contributor Guide](https://docs.opendp.org/en/stable/contributor/contribution-process.html).
|
opendp-0.9.2/setup.cfg
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
[metadata]
|
|
2
|
+
name = opendp
|
|
3
|
+
version = 0.9.2
|
|
4
|
+
url = https://opendp.org
|
|
5
|
+
project_urls =
|
|
6
|
+
Source = https://github.com/opendp/opendp
|
|
7
|
+
Issues = https://github.com/opendp/opendp/issues
|
|
8
|
+
Documentation = https://docs.opendp.org/
|
|
9
|
+
author = The OpenDP Project
|
|
10
|
+
author_email = info@opendp.org
|
|
11
|
+
classifiers =
|
|
12
|
+
Programming Language :: Python :: 3
|
|
13
|
+
License :: OSI Approved :: MIT License
|
|
14
|
+
Operating System :: OS Independent
|
|
15
|
+
license_files = ../LICENSE
|
|
16
|
+
description = Python bindings for the OpenDP Library
|
|
17
|
+
long_description = file: README.md
|
|
18
|
+
long_description_content_type = text/markdown
|
|
19
|
+
keywords =
|
|
20
|
+
differential privacy
|
|
21
|
+
|
|
22
|
+
[options]
|
|
23
|
+
zip_safe = false
|
|
24
|
+
python_requires = >=3.9
|
|
25
|
+
packages = find:
|
|
26
|
+
package_dir =
|
|
27
|
+
= src
|
|
28
|
+
|
|
29
|
+
[options.packages.find]
|
|
30
|
+
where = src
|
|
31
|
+
|
|
32
|
+
[options.package_data]
|
|
33
|
+
opendp =
|
|
34
|
+
lib/*
|
|
35
|
+
py.typed
|
|
36
|
+
|
|
37
|
+
[options.extras_require]
|
|
38
|
+
numpy =
|
|
39
|
+
numpy>=1.17,<2.0
|
|
40
|
+
randomgen
|
|
41
|
+
scikit-learn =
|
|
42
|
+
scikit-learn
|
|
43
|
+
%(numpy)s
|
|
44
|
+
polars =
|
|
45
|
+
polars==0.20.16
|
|
46
|
+
pyarrow
|
|
47
|
+
%(scikit-learn)s
|
|
48
|
+
|
|
49
|
+
[bdist_wheel]
|
|
50
|
+
py-limited-api = cp39
|
|
51
|
+
|
|
52
|
+
[egg_info]
|
|
53
|
+
tag_build =
|
|
54
|
+
tag_date = 0
|
|
55
|
+
|
opendp-0.9.2/setup.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from setuptools import setup # type: ignore
|
|
2
|
+
import os
|
|
3
|
+
|
|
4
|
+
if not os.path.isdir("src/opendp/lib") and os.path.isdir("src/opendp/rust"):
|
|
5
|
+
try:
|
|
6
|
+
from setuptools_rust import RustExtension, Binding # type: ignore[import]
|
|
7
|
+
except ImportError:
|
|
8
|
+
raise ImportError(
|
|
9
|
+
"A binary wheel is not available for your platform. Attempting to build from source instead, but setuptools-rust is not installed. Please run `pip install setuptools-rust` first."
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
setup(
|
|
13
|
+
rust_extensions=[
|
|
14
|
+
RustExtension(
|
|
15
|
+
# for reference, target=path/in/package/[BINARY_NAME]
|
|
16
|
+
target="opendp/lib/opendp",
|
|
17
|
+
path="src/opendp/rust/Cargo.toml",
|
|
18
|
+
args=["--color", "always"],
|
|
19
|
+
features=["untrusted", "ffi", "polars"],
|
|
20
|
+
binding=Binding.NoBinding,
|
|
21
|
+
)
|
|
22
|
+
]
|
|
23
|
+
)
|
|
24
|
+
else:
|
|
25
|
+
setup()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from opendp.mod import Transformation, Measurement, OpenDPException, UnknownTypeException
|