add python prerequisites

This commit is contained in:
Riku
2023-02-18 11:50:48 +01:00
parent 7bf1d8885c
commit a2119f3581

View File

@@ -14,14 +14,16 @@ This tutorial demonstrates how you can buy and sell tokens in the [decentralized
## Prerequisites
- You need a connection to the XRP Ledger network. As shown in this tutorial, you can use public servers for testing.
- You should be familiar with the Getting Started instructions for your preferred client library. This page provides examples for the following:
- **JavaScript** with the [xrpl.js library](https://github.com/XRPLF/xrpl.js/). See [Get Started Using JavaScript](get-started-using-javascript.html) for setup steps.
- **Python** with the [`xrpl-py` library](https://xrpl-py.readthedocs.io/). See [Get Started using Python](get-started-using-python.html) for setup steps.
- You can also read along and use the interactive steps in your browser without any setup.
<!-- Source for this specific tutorial's interactive bits: -->
<script src='https://cdn.jsdelivr.net/npm/bignumber.js@9.0.2/bignumber.min.js'></script>
<script type="application/javascript" src="assets/js/tutorials/trade-in-the-dex.js"></script>
This page provides JavaScript examples that use the [xrpl.js](https://js.xrpl.org/) library. See [Get Started Using JavaScript](get-started-using-javascript.html) for setup instructions.
Since JavaScript works in the web browser, you can read along and use the interactive steps without any setup.
## Example Code
Complete sample code for all of the steps of this tutorial is available under the [MIT license](https://github.com/XRPLF/xrpl-dev-portal/blob/master/LICENSE).
@@ -49,6 +51,10 @@ _JavaScript_
{{ include_code("_code-samples/trade-in-the-decentralized-exchange/js/base-with-bignumber.js", language="js") }}
_Python_
{{ include_code("_code-samples/get-started/py/base.py", language="py") }}
<!-- MULTICODE_BLOCK_END -->
**Note:** The JavaScript code samples in this tutorial use the [`async`/`await` pattern](https://javascript.info/async-await). Since `await` needs to be used from within an `async` function, the remaining code samples are written to continue inside the `main()` function started here. You can also use Promise methods `.then()` and `.catch()` instead of `async`/`await` if you prefer.