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
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
Built Distribution
File details
Details for the file suinspy-0.2.1.tar.gz
.
File metadata
- Download URL: suinspy-0.2.1.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7add1635d466ad501b4d212ee1a8353e9adfc5c9f369bb6526de5b413ac2cb2e |
|
MD5 | 539e0676e92d8319282938111b94707d |
|
BLAKE2b-256 | e4258d3eaf7677f4a49e5ba5154995bb2ae1a02e3791e502b5c3bd9d37fa1844 |
File details
Details for the file suinspy-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: suinspy-0.2.1-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e417ee2fa38778ad6a206e9e2e45d2c1e238533e623b58d12af7c20884cb6d00 |
|
MD5 | ace1abd1394bd429314e193e27abf640 |
|
BLAKE2b-256 | e1ef091002e7c37e2da752d04e08842b8aa6be2feb99900865787a6d3c82c39a |