Skip to main content

No project description provided

Project description

Aptos Python SDK

Discord PyPI Package Version PyPI Package Downloads

You need to connect to an Aptos node to use this library, or run one yourself locally.

Usage

Currently this is still in development and is unsuitable for directly interfacing with Aptos.

Requirements

Testing

To run all unit tests:

python3 -m unittest discover -s aptos_sdk/ -p '*.py' -t ..

To run all end-to-end tests:

ln -s `pwd`/aptos_sdk examples/
python3 -m examples.coin
python3 -m examples.token

Note: end-to-end tests rely on Aptos Devnet.

Autoformatting

find aptos_sdk -type f -name "*.py" | xargs python3 -m black
find aptos_sdk -type f -name "*.py" | xargs python3 -m autoflake -i -r --remove-all-unused-imports --remove-unused-variables --ignore-init-module-imports
find aptos_sdk -type f -name "*.py" | xargs python3 -m isort

Generating types

The Python openapi-python-client tool cannot parse references. Therefore there are three options:

  • Use swagger-cli to dereference, gain a type explosion, and still have missing types
  • Live without missing types
  • Write a pure python implementation with no autogenerated code

Currently the team is moving forward with pure python, but leaves the following notes for the curious:

npm install  -g @apidevtools/swagger-cli
swagger-cli bundle --dereference ../../../api/doc/v0/openapi.yaml  -t yaml > openapi.yaml
python3 -m openapi_python_client generate --path openapi.yaml
mv aptos-dev-api-specification-client/aptos_dev_api_specification_client/ aptos_sdk/openapi

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.1.0.0.tar.gz (15.9 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: aptos_sdk-0.1.0.0.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.10.5

File hashes

Hashes for aptos_sdk-0.1.0.0.tar.gz
Algorithm Hash digest
SHA256 e5f88f64c84f76dfe2be2b985f50997aaa043f26ba11946798308956b7b3e69c
MD5 6a1f602e08a9f22c7e07a791b13c538c
BLAKE2b-256 e4cc71148d5e66cbb46b15fa877c71c20c82aaf9f686f8fae0803bb2e84c8729

See more details on using hashes here.

Supported by

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