Python SDK
Aptos provides a lightly maintained official Python SDK. It is available on PyPi with the source code in the aptos-python-sdk GitHub repository. Much of the functionality of the Python SDK mirrors the Typescript SDK. The primary purpose of the Python SDK is to help Python developers to quickly become familiar with Aptos and as an accompaniment to Aptos tutorials.
Installing Python SDK
Section titled “Installing Python SDK”The Python SDK can either be installed via pip, from source, or embedded:
Install with pip
Section titled “Install with pip”To install via pip:
pip3 install aptos-sdkThe aptos-sdk will be installed in the local site packages directory. For
example, on macOS, you will find the aptos-sdk in the
~/Library/Python/3.8/lib/python/site-packages/aptos_sdk directory.
Install from the source code
Section titled “Install from the source code”To install from source:
git clone https://github.com/aptos-labs/aptos-python-sdkpip3 install . --userInstall by embedding
Section titled “Install by embedding”To embed the Python SDK into your existing Python project:
cd /path/to/python/projectcp -r /path/to/aptos-python-sdk aptos-sdkUsing the Python SDK
Section titled “Using the Python SDK”See the Developer Tutorials for code examples showing how to use the Python SDK.