Skip to content
🎉 Welcome to the new Aptos Docs! Click here to submit feedback!
BuildSDKsPython SDK

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

The Python SDK can either be installed via pip, from source, or embedded:

Install with pip

To install via pip:

Terminal
pip3 install aptos-sdk

The 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

To install from source:

Terminal
git clone https://github.com/aptos-labs/aptos-python-sdk
pip3 install . --user

Install by embedding

To embed the Python SDK into your existing Python project:

Terminal
cd /path/to/python/project
cp -r /path/to/aptos-python-sdk aptos-sdk

Using the Python SDK

See the Developer Tutorials for code examples showing how to use the Python SDK.