opendp/opendp

GitHub: opendp/opendp

开源差分隐私算法核心库,为隐私保护数据分析提供模块化、可验证的统计算法支持。

Stars: 409 | Forks: 67

OpenDP logo [![项目状态:WIP – 初始开发正在进行中,但尚未有面向公众的稳定、可用版本。](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip) [![许可证:MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/license/MIT) [![Python](https://img.shields.io/badge/Python-3.10%20%E2%80%93%203.13-blue)](https://docs.opendp.org/en/stable/api/python/index.html) [![R](https://img.shields.io/badge/R-grey)](https://docs.opendp.org/en/stable/api/r/) [![Rust](https://img.shields.io/badge/Rust-grey)](https://docs.rs/crate/opendp/latest) [![main CI](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/beddac2e4d130548.svg)](https://github.com/opendp/opendp/actions/workflows/smoke-test.yml?query=branch%3Amain) [![nightly CI](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/969ed8963d130549.svg)](https://github.com/opendp/opendp/actions/workflows/nightly.yml?query=branch%3Amain) [![doc-check CI](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/cc8f6c27e9130550.svg)](https://github.com/opendp/opendp/actions/workflows/weekly-doc-check.yml?query=branch%3Amain) OpenDP 库是一个模块化的统计算法集合,这些算法符合[差分隐私](https://en.wikipedia.org/wiki/Differential_privacy)的定义。 它可用于构建隐私保护计算的应用程序,并支持多种不同的隐私模型。 OpenDP 使用 Rust 实现,并提供了 Python 和 R 的绑定以便于使用。 OpenDP 库的架构基于一个用于表达隐私感知计算的概念框架。 该框架在论文 [A Programming Framework for OpenDP](https://opendp.org/files/2025/11/opendp_programming_framework_11may2020_1_01.pdf) 中进行了描述。 OpenDP 库是更大的 [OpenDP 项目](https://opendp.org) 的一部分,这是一项社区努力,旨在构建用于分析私有数据的值得信赖的开源软件工具。 (为了简化文档,当我们提到 “OpenDP” 时,仅指该库,而非整个项目。) ## 状态 OpenDP 正在开发中,我们预计会频繁[发布新版本](https://github.com/opendp/opendp/releases),并整合来自 OpenDP 社区的反馈和代码贡献。 虽然这仍是一个进行中的工作,但它已可用于构建某些应用程序,以及为将扩展其功能的贡献制作原型。 我们欢迎您试用,并期待关于该库的反馈!但是,请注意以下限制: ## 安装说明 使用 `pip`([Python 的包安装程序](https://pypi.org/project/pip/))安装 OpenDP 的 Python 版本: ``` $ pip install opendp ``` 在 R 会话中安装 OpenDP 的 R 版本: ``` install.packages("opendp", repos = "https://opendp.r-universe.dev") ``` 更多信息可在[用户指南的入门部分](https://docs.opendp.org/en/stable/getting-started/)中找到。 ## 文档 OpenDP 的完整文档位于 https://docs.opendp.org。以下是一些有用的入口: * [用户指南](https://docs.opendp.org/en/stable/api/user-guide/index.html) * [Python API 文档](https://docs.opendp.org/en/stable/api/python/index.html) * [贡献者指南](https://docs.opendp.org/en/stable/contributing/index.html) ## 获取帮助 如果您在使用 OpenDP 时遇到问题,或想提交反馈,请联系我们!以下是一些联系我们的方式: