Skip to content

Commit b72f9d0

Browse files
committed
Update Python SDK links
1 parent 364fe42 commit b72f9d0

1 file changed

Lines changed: 19 additions & 12 deletions

File tree

website/docs/community-sdks/python-sdk.md

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
title: Python SDK
33
---
44

5-
[`cashscript-py`](https://pypi.org/project/cashscript-py/) is a community-maintained Python SDK for CashScript development. It is a port of the official [TypeScript SDK](../sdk/typescript-sdk.md) and aims to give Python developers (for example those building server-side tools, bots, or Electron Cash plugins) a familiar API for constructing and interacting with CashScript contracts on BCH without re-implementing low-level details.
5+
[`cashscript-py`][pypi] is a community-maintained Python SDK for CashScript development. It is a port of the official [TypeScript SDK][typescript-sdk] and aims to give Python developers (for example those building server-side tools, bots, or Electron Cash plugins) a familiar API for constructing and interacting with CashScript contracts on BCH without re-implementing low-level details.
66

77
:::info
88
The Python SDK is maintained independently from the official CashScript project. For the full API reference, guides and runnable examples, see the links under [Documentation](#documentation) below.
99
:::
1010

1111
## When to use the Python SDK
1212

13-
Use the Python SDK when you want to build and send CashScript transactions from a Python codebase. It mirrors the structure of the TypeScript SDK, so the same four core classes are available. See the [TypeScript SDK documentation](../sdk/typescript-sdk.md) for more details.
13+
Use the Python SDK when you want to build and send CashScript transactions from a Python codebase. It mirrors the structure of the TypeScript SDK, so the same four core classes are available. See the [TypeScript SDK documentation][typescript-sdk] for more details.
1414

1515
- the `Contract` class
1616
- the `TransactionBuilder` class
@@ -27,7 +27,7 @@ Install from PyPI:
2727
pip install cashscript-py
2828
```
2929

30-
Or, with [`uv`](https://docs.astral.sh/uv/):
30+
Or, with [`uv`][uv]:
3131

3232
```bash
3333
uv add cashscript-py
@@ -37,7 +37,7 @@ uv add cashscript-py
3737

3838
The usage of the 4 classes in your code is as follows: before using the SDK you create one or multiple contract artifacts compiled by `cashc`. Then to start using the SDK, you instantiate a `NetworkProvider`, which you then provide to instantiate a `Contract` from an `Artifact`. Once you have a `Contract` instance, you can use it in the `TransactionBuilder`. During transaction building you might need to generate a signature, in which case you would instantiate a `SignatureTemplate`.
3939

40-
For more complete examples of the SDK flow, refer to the [runnable examples](https://gitlab.com/cashscript-py/cashscript-py/-/tree/master/examples) in the Python SDK repository.
40+
For more complete examples of the SDK flow, refer to the [runnable examples][examples] in the Python SDK repository.
4141

4242
#### example
4343

@@ -64,22 +64,29 @@ tx_details = await transaction_builder.send()
6464

6565
## Feature parity with the TypeScript SDK
6666

67-
The Python SDK and the TypeScript SDK are developed independently and have independent versioning, so APIs and available functionality may drift between the two. The sections below call out the most notable gaps at the time of writing, but for anything beyond the basic flow you should always consult the [Python SDK documentation](https://cashscript-py.readthedocs.io/) rather than assuming parity with the TypeScript SDK.
67+
The Python SDK and the TypeScript SDK are developed independently and have independent versioning, so APIs and available functionality may drift between the two. The sections below call out the most notable gaps at the time of writing, but for anything beyond the basic flow you should always consult the [Python SDK documentation][readthedocs] rather than assuming parity with the TypeScript SDK.
6868

6969
The Python SDK covers the core `Contract`, `TransactionBuilder`, `NetworkProvider` and `SignatureTemplate` APIs, but a few features from the TypeScript SDK are not (yet) available:
7070

7171
- **`debug()`**: the TypeScript SDK can locally evaluate and debug transactions via a `debug()` API. The Python SDK does not currently provide an equivalent.
72-
- **`get_bitauth_uri()`**: the TypeScript SDK can generate a [BitAuth IDE](https://ide.bitauth.com/) URI via `getBitauthUri()`. The Python SDK does not currently provide this helper.
72+
- **`get_bitauth_uri()`**: the TypeScript SDK can generate a [BitAuth IDE][bitauth-ide] URI via `getBitauthUri()`. The Python SDK does not currently provide this helper.
7373
- **`generate_wc_transaction_object()`**: the TypeScript SDK can generate a WalletConnect signing payload. The Python SDK does not currently provide this feature.
7474

75-
See the [`transaction-builder.md` guide](https://gitlab.com/cashscript-py/cashscript-py/-/blob/master/docs/guide/transaction-builder.md) in the Python SDK repository for the full details on each of these sections.
75+
See the [Python SDK Transaction Builder guide][transaction-builder-guide] in the Python SDK repository for the full details on each of these sections.
7676

7777
## Documentation
7878

7979
The Python SDK has its own documentation site and examples.
8080

81-
- **PyPI package:** [cashscript-py](https://pypi.org/project/cashscript-py/)
82-
- **User guide:** [getting-started.md](https://gitlab.com/cashscript-py/cashscript-py/-/blob/master/docs/guide/getting-started.md)
83-
- **API reference:** [cashscript-py.readthedocs.io](https://cashscript-py.readthedocs.io/)
84-
- **Runnable examples:** [examples/](https://gitlab.com/cashscript-py/cashscript-py/-/tree/master/examples)
85-
- **Source code:** [gitlab.com/cashscript-py/cashscript-py](https://gitlab.com/cashscript-py/cashscript-py)
81+
- **Documentation:** [cashscript-py.readthedocs.io][readthedocs]
82+
- **PyPI package:** [cashscript-py][pypi]
83+
- **Source code:** [gitlab.com/cashscript-py/cashscript-py][source]
84+
85+
[pypi]: https://pypi.org/project/cashscript-py/
86+
[typescript-sdk]: ../sdk/typescript-sdk.md
87+
[uv]: https://docs.astral.sh/uv/
88+
[examples]: https://gitlab.com/cashscript-py/cashscript-py/-/tree/master/examples
89+
[readthedocs]: https://cashscript-py.readthedocs.io/
90+
[bitauth-ide]: https://ide.bitauth.com/
91+
[transaction-builder-guide]: https://cashscript-py.readthedocs.io/en/latest/guide/transaction-builder.html
92+
[source]: https://gitlab.com/cashscript-py/cashscript-py

0 commit comments

Comments
 (0)