Skip to main content

SUI client Python SDK

Project description

PySui

pysui

Python Client SDK for Sui blockchain

pysui SDK Dependencies

  • Rust (stable) for installation of Sui Binaries (optional) and building pysui-fastcrypto Rust wrapper (required)
  • Python version >= 3.10

Note: If moving from 0.51.0 or earlier it is recommended to start a new virtual environment and installing from PyPi!

pysui SDK current (github)

Release-0.55.0

  • Supports SUI 1.22.x RPC API
  • Backwards compatable to Sui 1.18.x RPC API

See CHANGELOG

PyPi current

Release-0.55.0 - Released 2024-03-22

Sui GraphQL RPC beta

MystenLabs announcement can be found Here. This change transitions from JSON RPC to GraphQL RPC.

With pysui 0.50.0 we released pysui's initial alignment with MystenLabs strategy. The timeline of changes will keep up with the Timeline as noted in the Sui GraphQL annoucement.

Note: The MystenLabs/Sui GraphQL RPC is currently only available on testnet

pysui 0.52.0 contains initial support for our February 2024 target:

  1. December 2023: Synchronous and asynchronous GraphQL clients (experimental) with intial 'read' queries parallel to current pysui read Builders. Also expose underlying GraphQL for users to craft their own queries.
  2. January 2024: Continue with GraphQL and Builder parity changes. Mysten to roll out live data to devnet, testnet and mainnet. Note, only testnet was available in Jan '24.
  3. February 2024: Begin deprecatating pysui Builders and existing SuiClients and enable SuiClient GraphQL 'streaming' support. Note, only testnet and mainnet are currently available in Feb '24, in addition:
  • DryRun and Execute are available
  • streaming is not yet supported
  • Examples for all supported queries and mutations are in pgql_s_example`` (Synchronous) and pgql_a_example` (Asynchronous)
  • Demo of new pysui Transaction Builder leveraging Sui GraphQL in pgql_s_ptb
  1. Sometime in 2024: Remove Builders, obsolete SuiClients and SuiTransaction, and bump pysui to version 1.0.0.

You can read pysui documentation on graphql beta here

FULL Documentation

Changelog

See CHANGELOG

Issues and enhancement requests

We would appreciate using the github issue log to let us know!

Release/Publish Strategy

See Strategies

Discord

Discord server click here:

Additions

There is a companion package called pysui-gadgets with a few utilities and ge-gaws that you may find interesting. It is a separate package also on on PyPi.

Local node support

We leverage suibase for our testing and SuiConfig includes an option for interacting directly with local nodes created by suibase

Ready to run

Requires:

  • Linux or macos (x86_64 or Mx)
  • Rust (stable) which also includes rustup and cargo
  • python 3.10 or greater
  • pkg-config
  • libtool
  • sui binaries to support publish Sui move packages

You will need suibase for interacting with local nodes, it is an indispensible addition to Sui developers tools!

Setup environment

python3 -m venv env

If, instead, you want to work with repo latest source code then read DEVELOP from repo

Activate

source env/bin/activate

or

. env/bin/activate

Install pysui

pip install pysui

Samples

See samples

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pysui-0.55.0-py3-none-any.whl (227.1 kB view details)

Uploaded Python 3

File details

Details for the file pysui-0.55.0-py3-none-any.whl.

File metadata

  • Download URL: pysui-0.55.0-py3-none-any.whl
  • Upload date:
  • Size: 227.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for pysui-0.55.0-py3-none-any.whl
Algorithm Hash digest
SHA256 403df0ec9236f6b50d218396a37f7713219744f060b30519ad490e6e2f540879
MD5 f7a237d39b4071345636f917a7f8d916
BLAKE2b-256 ffcee86a4e5d9ce7ba319487f797a41b5786f76933cfbb7e8cc290b7312c7225

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