-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* base quickstart off getting started (simplify a bit) #268 * prevent TypeError: make_identity() got an unexpected keyword argument 'T' #268 Co-authored-by: Andrew Vyrros <6577271+andrewvyrros@users.noreply.github.com>
- Loading branch information
1 parent
4ee3224
commit af7b2d9
Showing
2 changed files
with
27 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,30 @@ | ||
Quickstart | ||
========== | ||
|
||
(In the future, this section will describe how to use the `OpenDP Library`_.) | ||
.. contents:: |toctitle| | ||
:local: | ||
|
||
.. _OpenDP Library: https://github.com/opendp/opendp | ||
Installation | ||
------------ | ||
|
||
The easiest way to get started with OpenDP is from Python. Use ``pip`` to install the `opendp <https://pypi.org/project/opendp/>`_ package from PyPI. | ||
|
||
.. code-block:: bash | ||
% pip install opendp | ||
This will make the OpenDP modules available to your local environment. | ||
|
||
Hello, OpenDP! | ||
-------------- | ||
|
||
Once you've installed OpenDP, you can write your first program. In the example below, we'll construct an identity ``Transformation``, then invoke it on a string. | ||
|
||
.. doctest:: | ||
|
||
>>> from opendp.trans import make_identity | ||
>>> from opendp.typing import SubstituteDistance | ||
|
||
>>> identity = make_identity(M=SubstituteDistance, TA=str) | ||
>>> identity("Hello, world!") | ||
'Hello, world!' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters