Skip to main content

Aptos SDK

Project description

Aptos Python SDK

Discord PyPI Package Version PyPI Package Downloads

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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aptos_sdk-0.9.1.tar.gz (44.0 kB view details)

Uploaded Source

Built Distribution

aptos_sdk-0.9.1-py3-none-any.whl (51.7 kB view details)

Uploaded Python 3

File details

Details for the file aptos_sdk-0.9.1.tar.gz.

File metadata

  • Download URL: aptos_sdk-0.9.1.tar.gz
  • Upload date:
  • Size: 44.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.6 Linux/6.10.10-arch1-1

File hashes

Hashes for aptos_sdk-0.9.1.tar.gz
Algorithm Hash digest
SHA256 d67f600237b9a644757daf3cc2265d00091b3714f12802490433bc5d5d6fba08
MD5 78dc88126bf7f0c1373aa1c56ed95c42
BLAKE2b-256 acbb017722017bd919538027488e5a756a535ddb4b23dc3ca13f71b94edcbd94

See more details on using hashes here.

File details

Details for the file aptos_sdk-0.9.1-py3-none-any.whl.

File metadata

  • Download URL: aptos_sdk-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 51.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.6 Linux/6.10.10-arch1-1

File hashes

Hashes for aptos_sdk-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b8a737ad0b676f27afb6cf2a972ec568b082086afcc83a61fa682781c5158d55
MD5 003fb6a00d016cea3947ee073d372783
BLAKE2b-256 661759d4b5a3c8b0470cb7d8809fb585ed54d04c586c9d7c1bde801b91ae3a26

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page