diff --git a/documentation/00_sdk_overview.md b/documentation/00_sdk_overview.md index 3c01607ab..748ef5565 100644 --- a/documentation/00_sdk_overview.md +++ b/documentation/00_sdk_overview.md @@ -23,7 +23,7 @@ The Aleo SDK is divided into three Typescript/Javascript packages Aleo SDK -The official Aleo SDK providing Javascript/Typescript tools for creating zero knowledge app. +The official Aleo SDK providing Javascript/Typescript tools for creating zero knowledge apps. ### ⚡ Build your own app @@ -69,6 +69,17 @@ NodeJS is functional. Source: [`sdk/wasm`](https://github.com/AleoHQ/sdk/tree/testnet3/wasm) +## 4. [Aleo Python SDK]() - Zero Knowledge Algorithms in Python and Zero Knowledge Machine Learning + +The official Aleo Python SDK providing tools for creating zero knowledge apps. It consists of two separate libraries: + +* The **aleo** library, which uses foreign function interfaces to bring snarkVM functionalities to Python. +* The **zkml** library, which transpiles scikit-learn machine learning models into Leo programs for inference. + +Both libraries are in an early development stage. They can be installed through `pip install aleo` respectively `pip install zkml`. + +Source: [`python-sdk`](https://github.com/AleoHQ/python-sdk) + ## 📚 Documentation #### [API Documentation](https://developer.aleo.org) diff --git a/documentation/sdk/python/00_aleo_sdk.md b/documentation/sdk/python/00_aleo_sdk.md new file mode 100644 index 000000000..03fae0f5a --- /dev/null +++ b/documentation/sdk/python/00_aleo_sdk.md @@ -0,0 +1,59 @@ +--- +id: aleo-sdk +title: Aleo SDK +sidebar_label: Aleo SDK +--- + + +[![github]](https://github.com/AleoHQ/python-sdk/tree/master/sdk) + + +[github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=github + +[**aleo on PyPI**](https://pypi.org/project/aleo/) + +Aleo Python bindings for building zero-knowledge applications. + +This project uses `PyO3` and `Maturin` to provide a Python library named `aleo` that binds to snarkVM `Rust` functionalities. The resulting `aleo` library can be easily installed and used within Python. The project is at an early stage. At the moment, only Mac OS 11 or newer on Apple Silicon is supported - support for other operating systems will follow. If you are using another operating system, you may be able to build the library yourself following the instructions below. + +Supported functionalities currently include: +* Private key generation + + +## Usage +The `aleo` Python library is available on [PyPI](https://pypi.org/project/aleo/) for installation. + +#### Installation +Ensure you have Python 3.11 or newer installed. If your operating system is supported, you can install the library from pip: + +```bash +pip3 install aleo +``` + +Alternatively, you can also install from a `.whl` file, either from the [GitHub repository](https://github.com/AleoHQ/python-sdk/tree/master/sdk/target/wheels), or by building it yourself. For the installation, use a command like this: + +```bash +pip3 install aleo-0.0.3-cp311-cp311-macosx_11_0_arm64.whl +``` + +Note: On some systems, you may need to use `pip` instead of `pip3`. + +### Actual usage +You can import the library, generate a private key object, and print it as a string as in the following example: +```Python +import aleo +private_key = aleo.PrivateKey() +print(private_key.to_string()) +``` + +#### Build Instructions +To build it, first clone the [GitHub repository](https://github.com/AleoHQ/python-sdk/tree/master/sdk). Then, run the following command: +```bash +bash build.sh +``` + +After successful building, you will find a new `.whl` file in the `target/wheels` directory that you can install using the command from above. + +## Building Python Apps + +Further documentation and tutorials as to how to use the `aleo` Python library.