Coder Social home page Coder Social logo

erionbaku / starknet.py Goto Github PK

View Code? Open in Web Editor NEW

This project forked from software-mansion/starknet.py

0.0 0.0 0.0 4.28 MB

โœจ ๐Ÿ Python SDK for Starknet.

Home Page: https://starknetpy.rtfd.io/

License: MIT License

Shell 0.58% Python 88.21% Cairo 11.22%

starknet.py's Introduction

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.gateway_client import GatewayClient

contract = await Contract.from_address(
    address="0x06689f1bf69af5b8e94e5ab9778c885b37c593d1156234eb423967621f596e73",
    client=GatewayClient("testnet"),
)
(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.gateway_client import GatewayClient

contract = Contract.from_address_sync(
    address="0x06689f1bf69af5b8e94e5ab9778c885b37c593d1156234eb423967621f596e73",
    client=GatewayClient("testnet"),
)
(value,) = contract.functions["get_balance"].call_sync()

For more examples click here.

starknet.py's People

Contributors

war-in avatar drknzz avatar cptartur avatar dependabot[bot] avatar arcticae avatar solpatium avatar tomek0123456789 avatar ddoktorski avatar antazoey avatar thenry14 avatar ca11ab1e avatar radinyn avatar maksymiliandemitraszek avatar exomonk avatar hayden4r4 avatar cremafr avatar omahs avatar pweglik avatar yoga-braavos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.