# Aptos Python SDK
[![Discord][discord-image]][discord-url]
[![PyPI Package Version][pypi-image-version]][pypi-url]
[![PyPI Package Downloads][pypi-image-downloads]][pypi-url]
This provides basic functionalities to interact with [Aptos](https:/github.com/aptos-labs/aptos-core/). Get started [here](https://aptos.dev/guides/system-integrators-guide/#getting-started).
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](https://python-poetry.org/docs/#installation) for packaging and dependency management:
```
curl -sSL https://install.python-poetry.org | python3 -
poetry install
```
## Unit testing
```bash
make test
```
## E2E testing and Using the Aptos CLI
* Download and install the [Aptos CLI](https://aptos.dev/tools/aptos-cli/use-cli/running-a-local-network).
* Set the environment variable `APTOS_CLI_PATH` to the full path of the CLI.
* Retrieve the [Aptos Core Github Repo](https://github.com/aptos-labs/aptos-core) (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):
```bash
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:
```bash
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:
```bash
make examples
```
Integration Testing Using the Aptos CLI:
```bash
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
```bash
make fmt
```
## Autolinting
```bash
make lint
```
## Package Publishing
* Download the [Aptos CLI](https://aptos.dev/tools/aptos-cli/install-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](https://semver.org/) as closely as possible
[repo]: https://github.com/aptos-labs/aptos-core
[pypi-image-version]: https://img.shields.io/pypi/v/aptos-sdk.svg
[pypi-image-downloads]: https://img.shields.io/pypi/dm/aptos-sdk.svg
[pypi-url]: https://pypi.org/project/aptos-sdk
[discord-image]: https://img.shields.io/discord/945856774056083548?label=Discord&logo=discord&style=flat~~~~
[discord-url]: https://discord.gg/aptosnetwork
Raw data
{
"_id": null,
"home_page": "https://github.com/aptos-labs/aptos-core/tree/main/ecosystem/python/sdk",
"name": "aptos-sdk",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8.1",
"maintainer_email": null,
"keywords": "web3, sdk, aptos, blockchain",
"author": "Aptos Labs",
"author_email": "opensource@aptoslabs.com",
"download_url": "https://files.pythonhosted.org/packages/01/a4/73c0ac3b0be0e03e53025fdd9669b592932738fb9ea2f2b3459c9742cf91/aptos_sdk-0.10.0.tar.gz",
"platform": null,
"description": "# Aptos Python SDK\n[![Discord][discord-image]][discord-url]\n[![PyPI Package Version][pypi-image-version]][pypi-url]\n[![PyPI Package Downloads][pypi-image-downloads]][pypi-url]\n\nThis provides basic functionalities to interact with [Aptos](https:/github.com/aptos-labs/aptos-core/). Get started [here](https://aptos.dev/guides/system-integrators-guide/#getting-started).\n\nCurrently, this is still in development and may not be suitable for production purposes.\n\nNote: The sync client is deprecated, please only start new projects using the async client. Feature contributions to the sync client will be rejected.\n\n## Requirements\nThis SDK uses [Poetry](https://python-poetry.org/docs/#installation) for packaging and dependency management:\n\n```\ncurl -sSL https://install.python-poetry.org | python3 -\npoetry install\n```\n\n## Unit testing\n```bash\nmake test\n```\n\n## E2E testing and Using the Aptos CLI\n\n* Download and install the [Aptos CLI](https://aptos.dev/tools/aptos-cli/use-cli/running-a-local-network).\n* Set the environment variable `APTOS_CLI_PATH` to the full path of the CLI.\n* Retrieve the [Aptos Core Github Repo](https://github.com/aptos-labs/aptos-core) (git clone https://github.com/aptos-labs/aptos-core)\n* Set the environment variable `APTOS_CORE_REPO` to the full path of the Repository.\n* `make integration_test`\n\nYou can do this a bit more manually by:\n\nFirst, run a local testnet (run this from the root of aptos-core):\n\n```bash\naptos node run-local-testnet --force-restart --assume-yes --with-indexer-api\n```\n\nNext, tell the end-to-end tests to talk to this locally running testnet:\n\n```bash\nexport APTOS_CORE_REPO=\"/path/to/repo\"\nexport APTOS_FAUCET_URL=\"http://127.0.0.1:8081\"\nexport APTOS_INDEXER_URL=\"http://127.0.0.1:8090/v1/graphql\"\nexport APTOS_NODE_URL=\"http://127.0.0.1:8080/v1\"\n```\n\nFinally run the tests:\n\n```bash\nmake examples\n```\n\nIntegration Testing Using the Aptos CLI:\n\n```bash\nmake integration_test\n```\n\n> [!NOTE]\n> 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.\n\n## Autoformatting\n```bash\nmake fmt\n```\n\n## Autolinting\n```bash\nmake lint\n```\n\n## Package Publishing\n\n* Download the [Aptos CLI](https://aptos.dev/tools/aptos-cli/install-cli/).\n* Set the environment variable `APTOS_CLI_PATH` to the full path of the CLI.\n* `poetry run python -m aptos_sdk.cli` and set the appropriate command-line parameters\n\n## Semantic versioning\nThis project follows [semver](https://semver.org/) as closely as possible\n\n[repo]: https://github.com/aptos-labs/aptos-core\n[pypi-image-version]: https://img.shields.io/pypi/v/aptos-sdk.svg\n[pypi-image-downloads]: https://img.shields.io/pypi/dm/aptos-sdk.svg\n[pypi-url]: https://pypi.org/project/aptos-sdk\n[discord-image]: https://img.shields.io/discord/945856774056083548?label=Discord&logo=discord&style=flat~~~~\n[discord-url]: https://discord.gg/aptosnetwork\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Aptos SDK",
"version": "0.10.0",
"project_urls": {
"Homepage": "https://github.com/aptos-labs/aptos-core/tree/main/ecosystem/python/sdk",
"Repository": "https://github.com/aptos-labs/aptos-core"
},
"split_keywords": [
"web3",
" sdk",
" aptos",
" blockchain"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c1db13248474f6c773788c35982b3dd1677ce0287ec2bd5d02a133fcab4156a1",
"md5": "f423c544fe485564293046a06a4fd952",
"sha256": "f6e736cc73cdba3a6dc43302df2fb9de0c72b9c53139d95cc0c70b5f0a68e208"
},
"downloads": -1,
"filename": "aptos_sdk-0.10.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f423c544fe485564293046a06a4fd952",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8.1",
"size": 55677,
"upload_time": "2024-11-08T17:24:59",
"upload_time_iso_8601": "2024-11-08T17:24:59.951748Z",
"url": "https://files.pythonhosted.org/packages/c1/db/13248474f6c773788c35982b3dd1677ce0287ec2bd5d02a133fcab4156a1/aptos_sdk-0.10.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "01a473c0ac3b0be0e03e53025fdd9669b592932738fb9ea2f2b3459c9742cf91",
"md5": "19822e02fd5a094c2921099355744d1e",
"sha256": "72dbbd2b7f7e5f1dc329f506527eb873196f94658f79d686de75b1971ae521a8"
},
"downloads": -1,
"filename": "aptos_sdk-0.10.0.tar.gz",
"has_sig": false,
"md5_digest": "19822e02fd5a094c2921099355744d1e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8.1",
"size": 48436,
"upload_time": "2024-11-08T17:25:01",
"upload_time_iso_8601": "2024-11-08T17:25:01.662455Z",
"url": "https://files.pythonhosted.org/packages/01/a4/73c0ac3b0be0e03e53025fdd9669b592932738fb9ea2f2b3459c9742cf91/aptos_sdk-0.10.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-08 17:25:01",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "aptos-labs",
"github_project": "aptos-core",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "aptos-sdk"
}