Aptos SDK
Project description
Aptos Python SDK
This provides basic functionalities to interact with Aptos. Get started here.
Currently, this is still in development and may not be suitable for production purposes.
Note: The sync client is deprecated, please only start new projects using the async client. Feature contributions to the sync client will be rejected.
Requirements
This SDK uses Poetry for packaging and dependency management:
curl -sSL https://install.python-poetry.org | python3 -
poetry install
Unit testing
make test
E2E testing and Using the Aptos CLI
- Download and install the Aptos CLI.
- Set the environment variable
APTOS_CLI_PATH
to the full path of the CLI. - Retrieve the Aptos Core Github Repo (git clone https://github.com/aptos-labs/aptos-core)
- Set the environment variable
APTOS_CORE_REPO
to the full path of the Repository. make integration_test
You can do this a bit more manually by:
First, run a local testnet (run this from the root of aptos-core):
aptos node run-local-testnet --force-restart --assume-yes --with-indexer-api
Next, tell the end-to-end tests to talk to this locally running testnet:
export APTOS_CORE_REPO="/path/to/repo"
export APTOS_FAUCET_URL="http://127.0.0.1:8081"
export APTOS_INDEXER_URL="http://127.0.0.1:8090/v1/graphql"
export APTOS_NODE_URL="http://127.0.0.1:8080/v1"
Finally run the tests:
make examples
Integration Testing Using the Aptos CLI:
make integration_test
[!NOTE] The Python SDK does not require the Indexer, if you would prefer to test without it, unset or do not set the environmental variable
APTOS_INDEXER_URL
and exclude--with-indexer-api
from running the aptos node software.
Autoformatting
make fmt
Autolinting
make lint
Package Publishing
- Download the Aptos CLI.
- Set the environment variable
APTOS_CLI_PATH
to the full path of the CLI. poetry run python -m aptos_sdk.cli
and set the appropriate command-line parameters
Semantic versioning
This project follows semver as closely as possible
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file aptos_sdk-0.10.0.tar.gz
.
File metadata
- Download URL: aptos_sdk-0.10.0.tar.gz
- Upload date:
- Size: 48.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.5 Darwin/24.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72dbbd2b7f7e5f1dc329f506527eb873196f94658f79d686de75b1971ae521a8 |
|
MD5 | 19822e02fd5a094c2921099355744d1e |
|
BLAKE2b-256 | 01a473c0ac3b0be0e03e53025fdd9669b592932738fb9ea2f2b3459c9742cf91 |
File details
Details for the file aptos_sdk-0.10.0-py3-none-any.whl
.
File metadata
- Download URL: aptos_sdk-0.10.0-py3-none-any.whl
- Upload date:
- Size: 55.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.5 Darwin/24.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6e736cc73cdba3a6dc43302df2fb9de0c72b9c53139d95cc0c70b5f0a68e208 |
|
MD5 | f423c544fe485564293046a06a4fd952 |
|
BLAKE2b-256 | c1db13248474f6c773788c35982b3dd1677ce0287ec2bd5d02a133fcab4156a1 |