Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
war-in committed Sep 8, 2022
2 parents 1128d4a + b34deff commit 7620f82
Show file tree
Hide file tree
Showing 29 changed files with 655 additions and 425 deletions.
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</div>
<h2 align="center">StarkNet SDK for Python</h2>

<p align="center">
<div align="center">

[![codecov](https://codecov.io/gh/software-mansion/starknet.py/branch/master/graph/badge.svg?token=3E54E8RYSL)](https://codecov.io/gh/software-mansion/starknet.py)
[![pypi](https://img.shields.io/pypi/v/starknet.py)](https://pypi.org/project/starknet.py/)
Expand All @@ -13,27 +13,32 @@
[![stars](https://img.shields.io/github/stars/software-mansion/starknet.py?color=yellow)](https://github.com/software-mansion/starknet.py/stargazers)
[![starkware](https://img.shields.io/badge/powered_by-StarkWare-navy)](https://starkware.co)

</p>
</div>

## 📘 Documentation
- [Installation](https://starknetpy.rtfd.io/en/latest/installation.html)
- [Quickstart](https://starknetpy.rtfd.io/en/latest/quickstart.html)
- [Guide](https://starknetpy.rtfd.io/en/latest/guide.html)
- [API](https://starknetpy.rtfd.io/en/latest/api.html)

## Installation
## ⚙️ Installation
To install this package run

`pip install starknet.py`
```
pip install starknet.py
```

or using Poetry:

`poetry add starknet.py`
```
poetry add starknet.py
```

## ▶️ Example usage
### Asynchronous API
This is the recommended way of using the SDK.
```

```python
from starknet_py.contract import Contract
from starknet_py.net.client import Client

Expand All @@ -48,7 +53,7 @@ await invocation.wait_for_acceptance()
### Synchronous API
You can access synchronous world with `_sync` postfix.

```
```python
from starknet_py.contract import Contract
from starknet_py.net.client import Client

Expand All @@ -60,4 +65,4 @@ invocation.wait_for_acceptance_sync()
(saved,) = contract.functions["get_value"].call_sync(key) # 7
```

See more [here](https://starknetpy.rtfd.io/en/latest/quickstart.html).
For more examples click [here](https://starknetpy.rtfd.io/en/latest/quickstart.html).
8 changes: 4 additions & 4 deletions docs/guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This is how we can interact with it:

.. literalinclude:: ../starknet_py/tests/e2e/docs/guide/test_using_existing_contracts.py
:language: python
:lines: 34-40,44-49,57-92
:lines: 34-40,44-49,57-66,70-74,78-82,86-101
:dedent: 4


Expand All @@ -32,7 +32,7 @@ Here is an example:

.. literalinclude:: ../starknet_py/tests/e2e/docs/guide/test_account_client_details.py
:language: python
:lines: 10-15,19-23,28-55
:lines: 8-13,17-21,26-56
:dedent: 4


Expand All @@ -57,7 +57,7 @@ Here's how you can deploy new contracts:

.. literalinclude:: ../starknet_py/tests/e2e/docs/guide/test_deploying_new_contracts.py
:language: python
:lines: 10-33,37-66
:lines: 10-33,37-68
:dedent: 4


Expand Down Expand Up @@ -201,7 +201,7 @@ Here is a usage example:

.. literalinclude:: ../starknet_py/tests/e2e/docs/guide/test_using_cairo_serializer.py
:language: python
:lines: 9-39,44-49,54-96
:lines: 9-39,44-49,54-97
:dedent: 4


Expand Down
2 changes: 1 addition & 1 deletion docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Example usage:

.. literalinclude:: ../starknet_py/tests/e2e/docs/quickstart/test_using_account_client.py
:language: python
:lines: 14-17,21-26,30-60
:lines: 12-15,19-24,28-58
:dedent: 4

Using Contract
Expand Down
142 changes: 134 additions & 8 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "starknet-py"
version = "0.5.1-alpha"
version = "0.5.2-alpha"
description = "A python SDK for StarkNet"
authors = ["Tomasz Rejowski <[email protected]>", "Jakub Ptak <[email protected]>"]
include = ["starknet_py", "starknet_py/utils/crypto/libcrypto_c_exports.*"]
Expand Down Expand Up @@ -28,20 +28,20 @@ typing-extensions = "^4.3.0"
docs = ["sphinx", "enum-tools"]
eth-tester = ["tester"]

[tool.poetry.dev-dependencies]
[tool.poetry.group.dev.dependencies]
starknet-devnet = {git = "https://github.com/Shard-Labs/starknet-devnet.git", rev = "03e77ec828418ce158af2294926b62dadc406747"}
pytest = "^6.2.5"
black = "^22.3.0"
poethepoet = "^0.11.0"
coverage = "^6.1.2"
pytest-asyncio = "^0.16.0"
pytest-asyncio = "^0.19.0"
sphinx-rtd-theme = "^1.0.0"
pylint = "2.13.5"
setuptools = "^65.3.0"
pytest-mock = "^3.6.1"
pytest-xdist = "^2.5.0"
web3 = {extras=["tester"], version="6.0.0b4"}


[tool.poe.tasks]
test = ["test_unit", "test_e2e", "test_docs"]
test_unit.shell = "coverage run -m pytest starknet_py --ignore=starknet_py/tests/e2e"
Expand Down
Loading

0 comments on commit 7620f82

Please sign in to comment.