Skip to main content

A python SDK for Starknet

Project description

starknet.py

Starknet SDK for Python

codecov pypi build docs license stars starkware

📘 Documentation

⚙️ Installation

Installation varies between operating systems.

See our documentation on complete instructions

▶️ Example usage

Asynchronous API

This is the recommended way of using the SDK.

from starknet_py.contract import Contract
from starknet_py.net.full_node_client import FullNodeClient

contract = await Contract.from_address(
    address="0x06689f1bf69af5b8e94e5ab9778c885b37c593d1156234eb423967621f596e73",
    client=FullNodeClient(node_url="https://your.node.url"),
)
(value,) = await contract.functions["get_balance"].call()

Synchronous API

You can access synchronous world with _sync postfix.

from starknet_py.contract import Contract
from starknet_py.net.full_node_client import FullNodeClient

contract = Contract.from_address_sync(
    address="0x06689f1bf69af5b8e94e5ab9778c885b37c593d1156234eb423967621f596e73",
    client=FullNodeClient(node_url="https://your.node.url"),
)
(value,) = contract.functions["get_balance"].call_sync()

For more examples click here.

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

starknet_py_unbroken-0.24.3.tar.gz (92.4 kB view details)

Uploaded Source

Built Distribution

starknet_py_unbroken-0.24.3-py3-none-any.whl (138.6 kB view details)

Uploaded Python 3

File details

Details for the file starknet_py_unbroken-0.24.3.tar.gz.

File metadata

  • Download URL: starknet_py_unbroken-0.24.3.tar.gz
  • Upload date:
  • Size: 92.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.14 Linux/6.10.6-200.fc40.x86_64

File hashes

Hashes for starknet_py_unbroken-0.24.3.tar.gz
Algorithm Hash digest
SHA256 06f765ae203947b5bd4b6e17c92ece837d359470af6f1d1b9fea251d940f88fd
MD5 e9964ac98e2a8635619ba4a152a25ece
BLAKE2b-256 4fa1faa0533c27b82f6e1faeea84cadb57e2c58f6348436fc59927b101f5bc63

See more details on using hashes here.

File details

Details for the file starknet_py_unbroken-0.24.3-py3-none-any.whl.

File metadata

File hashes

Hashes for starknet_py_unbroken-0.24.3-py3-none-any.whl
Algorithm Hash digest
SHA256 12c8e551b571c4718d9fd3a9e9977c5d3c4840537cf0c614f0cee76e91cb94e4
MD5 585d31834a1c359afafe77dab9068c09
BLAKE2b-256 9680a2bc5e665dcca6182d508f839464d937bbd94bdffff9d778f0be726fc99b

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