Skip to main content

Sui Name Service Python SDK Client

Project description

Sui Name Service Python SDK

Python Sui Name Service SDK Client - built by community with pysui

Quick Start

Install suinspy

pip install suinspy

poetry add suinspy

Using git support:

pip install git+https://git@github.com/andreidev1/suinspy.git

Configure pysui with your own data.

from pysui.sui.sui_config import SuiConfig
from pysui.sui.sui_clients.sync_client import SuiClient

def cfg_user():
    """Config user"""
    cfg = SuiConfig.user_config(
        # Required
        rpc_url="https://fullnode.mainnet.sui.io:443/",
        # Must be a valid Sui keystring (i.e. 'key_type_flag | private_key_seed' )
        prv_keys=["AIUPxQvxM18QggDDdTO0D0OD6PNVvtet50072d1grIyl"],
        # Needed for subscribing
        ws_url="wss://fullnode.mainnet.sui.io:443/",
    )
    return cfg

cfg = cfg_user()
client = SuiClient(cfg)

Import suinspy

from suinspy.client import SuiNsClient

Create an instance of SuinsClient and choose network type (mainet, testnet or devnet).

suins = SuiNsClient(client, 'mainet')

Fetch a name object:

suins.get_name_object("suins.sui")

Fetch a name object including the owner and avatar:

NOTE: show_owner and show_avatar arguments are optional.

suins.get_name_object("suins.sui", show_owner=True, show_avatar=True)

Fetch a SuiAddress linked to a name:

suins.get_address("suins.sui")

Official SuiNS Resources

Official SuiNS Website

Official SuiNS Discord

Ask A Question

Join Our Community discord

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

suinspy-0.2.0.tar.gz (4.2 kB view hashes)

Uploaded Source

Built Distribution

suinspy-0.2.0-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

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