Metadata-Version: 2.4
Name: pysui
Version: 0.99.0
Summary: SUI client Python SDK
License-Expression: Apache-2.0
Project-URL: changelog, https://github.com/FrankC01/pysui/blob/main/CHANGELOG.md
Project-URL: repository, https://github.com/FrankC01/pysui
Project-URL: issues, https://github.com/FrankC01/pysui/issues
Project-URL: documentation, https://pysui.readthedocs.io
Keywords: software development kit,sui,blockchain
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Programming Language :: Python
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: betterproto2[grpclib]<1.0.0,>=0.9.0
Requires-Dist: dataclasses_json<0.7.0,>=0.6.6
Requires-Dist: PyYAML<6.2,>=6.0.1
Requires-Dist: httpx<0.29,>=0.28.1
Requires-Dist: h2<5.0,>=4.2.0
Requires-Dist: jsonschema<4.30,>=4.23.0
Requires-Dist: websockets<16.0.0,>=15.0.1
Requires-Dist: gql[httpx,websockets]>=4.0.0
Requires-Dist: typing_utils<0.2.0,>=0.1.0
Requires-Dist: canoser==0.8.2
Requires-Dist: base58<2.2.0,>=2.1.1
Requires-Dist: Deprecated<1.3.0,>=1.2.14
Requires-Dist: pysui-fastcrypto>=0.7.2
Dynamic: license-file

<p align="center">
  <img width="150" height="200" src="https://raw.githubusercontent.com/FrankC01/pysui/main/images//pysui_logo_color.png" alt='PySui'>
</p>

# pysui

[![Downloads](https://static.pepy.tech/badge/pysui/month)](https://pepy.tech/project/pysui)

Python Client SDK for Sui blockchain

## A cup of coffee

- The team could use a cup or carafe. Sui address `0xc45e5ea887e037ddc6a482afa412773b4291c8fdc338f647fb0fcea324975d8e`

## pysui SDK install

### With Rust on machine

`pip install pysui` if first time or
`pip install -U --upgrade-strategy eager pysui` if upgrading.

### Without Rust on machine

1. Fetch the latest [pysui-fastcrypto](https://github.com/FrankC01/pysui-fastcrypto) binary from the release assets, unzip and `pip` install it
2. `pip install pysui`

## pysui SDK current (github)

**Release-0.99.1**

## PyPi current

**Release-0.99.0 - Released 2026-05-16**

- [Latest PyPi Version](https://pypi.org/project/pysui/)

> **⚠️ Deprecation Notice:** Release 1.0.0 will **remove** the legacy JSON-RPC client
> and synchronous GraphQL client. If your code uses either, migrate before upgrading.
> See the [Migration Guide](https://pysui.readthedocs.io/en/latest/migration_to_pysui_uci.html)
> on ReadTheDocs.

This is a significant release that redesigns pysui around the **Unified Client Interface (UCI)**.
It introduces breaking changes — see [CHANGELOG](https://github.com/FrankC01/pysui/blob/main/CHANGELOG.md)
for the full list.

### Unified Client Interface (UCI)

The **UCI** provides a protocol-agnostic programming model: write application code once and run it
transparently on either GraphQL or gRPC. The active transport is determined by configuration at
runtime — no code changes required to switch.

The UCI is built on four pillars:

1. **Thin Client Design** — pysui clients carry no convenience methods such as `get_coins` or
   `get_object`. All data access goes through typed request objects dispatched via
   `await client.execute(command=...)`, keeping the client surface small and transport-neutral.

2. **Protocol-Agnostic Command Execution** — Use `await client.execute(command=...)` with any
   `SuiCommand` subclass. The same code runs identically on both GraphQL and gRPC. Switching
   protocols requires only a configuration change.

3. **Shared Transaction Infrastructure** — PTBs with unified transaction builders and executor
   factories work across all protocols. Obtain a transaction builder via
   `await client.transaction(**kwargs)`, and executors via `await client.serial_executor(options=...)`
   or `await client.parallel_executor(options=...)`.

4. **Protocol-Level Access** — When you need capabilities beyond `SuiCommand`: use GraphQL
   QueryNodes via `execute_query_node` for custom queries, or gRPC Requests via
   `execute_grpc_request` for direct gRPC access.

### FULL Documentation

- [ReadTheDocs](https://pysui.readthedocs.io/en/latest/index.html)

### gRPC Support

- Refer to [pysui-grpc](https://github.com/FrankC01/pysui/blob/main/PYSUI_GRPC.md)

### GraphQL Support

- Refer to [pysui-graphql](https://github.com/FrankC01/pysui/blob/main/PYSUI_GRAPHQL.md)

### Changelog

See [CHANGELOG](https://github.com/FrankC01/pysui/blob/main/CHANGELOG.md)

### Issues and enhancement requests

We would appreciate using the [github issue log](https://github.com/FrankC01/pysui/issues) to let us know!

### Release/Publish Strategy

See [Strategies](https://github.com/FrankC01/pysui/blob/main/OP_STRATEGIES.md)

### Discord

Discord server invitation is [Found here](https://discord.gg/uCGYfY4Ph4):

### Local node support

Note: Only supported for JSON RPC clients, GraphQL not available for suibase at this time.

We leverage [suibase](https://github.com/ChainMovers/suibase) for our testing and SuiConfig includes an option for interacting directly with local nodes created by `suibase`

## Sample utilities

**Note**: Sample utiities are implemented using GraphQL

See [samples](https://github.com/FrankC01/pysui/blob/main/samples/README.md)
