mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-12-06 17:27:57 +00:00
consistent tut subdirs
This commit is contained in:
committed by
Amarantha Kulkarni
parent
e6c26969b1
commit
5679fc64e0
@@ -4,7 +4,7 @@ seo:
|
||||
labels:
|
||||
- Development
|
||||
---
|
||||
# Get Started Using Python
|
||||
# Get Started Using Python Library
|
||||
|
||||
This tutorial walks you through the basics of building an XRP Ledger-connected application using [`xrpl-py`](https://github.com/XRPLF/xrpl-py), a pure [Python](https://www.python.org) library built to interact with the XRP Ledger using native Python models and methods.
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
html: python.html
|
||||
parent: tutorials.html
|
||||
top_nav_grouping: Article Types
|
||||
metadata:
|
||||
indexPage: true
|
||||
---
|
||||
# Python
|
||||
|
||||
@@ -29,24 +31,6 @@ To get started:
|
||||
**Note**: Without the sample modules, you won't be able to try the examples that follow.
|
||||
|
||||
## Tutorial Modules
|
||||
|
||||
- **Send Payments on the XRPL**
|
||||
|
||||
- [Create Accounts and Send XRP](./modular-tutorials/send-payments/create-accounts-send-xrp/)
|
||||
- [Create TrustLine and Send Currency](./modular-tutorials/send-payments/create-trust-line-send-currency/)
|
||||
- [Create Time-based Escrows](./modular-tutorials/send-payments/create-time-based-escrows/)
|
||||
- [Create Conditional Escrows](./modular-tutorials/send-payments/create-conditional-escrows/)
|
||||
- [Send and Cash Checks](./modular-tutorials/send-payments/send-and-cash-checks/)
|
||||
|
||||
- **Mint and Trade NFTs on the XRPL**
|
||||
- [Mint and Burn NFTs](./modular-tutorials/nfts/mint-and-burn-nfts/)
|
||||
- [Transfer NFTs](./modular-tutorials/nfts/transfer-nfts/)
|
||||
- [Broker an NFT Sale](./modular-tutorials/nfts/broker-an-nft-sale/)
|
||||
- [Assign an Authorized Minter](./modular-tutorials/nfts/assign-an-authorized-minter/)
|
||||
- [Batch Mint NFTs](./modular-tutorials/nfts/batch-mint-nfts)
|
||||
|
||||
- **Build Applications with Python**
|
||||
- [Get Started Using Python](./build-apps/get-started/)
|
||||
- [Build a Desktop Wallet in Python](./build-apps/build-a-desktop-wallet-in-python/)
|
||||
|
||||
|
||||
{% child-pages /%}
|
||||
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
---
|
||||
html: send-payments-using-python.html
|
||||
parent: modular-tutorials-in-python.html
|
||||
seo:
|
||||
description: Use a Python test harness to send XRP,trade currencies, and more.
|
||||
labels:
|
||||
- Accounts
|
||||
- Cross-Currency
|
||||
- Non-fungible Tokens, NFTs
|
||||
- Payments
|
||||
- Quickstart
|
||||
- Tokens
|
||||
- XRP
|
||||
---
|
||||
# Send Payments Using Python
|
||||
|
||||
The XRP Ledger (XRPL) is a robust, secure, customizable service. You can create your own interface to try out the capabilities and support your specific business needs.
|
||||
|
||||
This quickstart describes a test harness interface you can build to try out the XRP Ledger. The test harness displays multiple accounts, so that you can transfer tokens from one account to the other and see the results in real time. The image below shows the Token Test Harness at the completion of step 4.
|
||||
|
||||
[](/docs/img/quickstart-py15.png)
|
||||
|
||||
That is a lot of fields and buttons, all working together to perform some significant practical tasks. But getting _started_ with the XRP Ledger is not that complicated. When you eat the elephant a bite at a time, none of the tasks are difficult to consume.
|
||||
|
||||
Typically, the example functions for interacting with the XRP Ledger involve four steps.
|
||||
|
||||
1. Connect to the XRP Ledger and instantiate your wallet.
|
||||
2. Make changes to the XRP Ledger using transactions.
|
||||
3. Get the state of accounts and tokens on the XRP Ledger using requests.
|
||||
4. Disconnect from the XRP Ledger.
|
||||
|
||||
Each lesson shows you how to build the Token Test Harness one section at a time. Each module lets you try out meaningful interactions with the test ledger, with complete Python code samples and a code walkthrough. There is also a link to the complete source code for each section that can be modified with a text editor and run in a Python environment. You can try out the examples in any order.
|
||||
|
||||
This quickstart tutorial introduces you to the API used to implement features and explore the capabilities of XRP Ledger. It does not represent _all_ of the capabilities of the API and this example is not intended for production or secure payment use.
|
||||
|
||||
Much of this is “brute force” code that sacrifices conciseness for readability. Each example builds on the previous step, adding a new Python UI file and a module to support the new behavior in the lesson. We expect the applications you build to greatly improve upon these examples. Your feedback and contributions are most welcome.
|
||||
|
||||
In this quickstart, you can:
|
||||
|
||||
1. [Create Accounts and Send XRP](create-accounts-send-xrp.md)
|
||||
2. [Create Trust Line and Send Currency](create-trust-line-send-currency.md).
|
||||
3. [Create Time-Based Escrows](create-time-based-escrows.md)
|
||||
4. [Create Conditional Escrows](create-conditional-escrows.md)
|
||||
|
||||
|
||||
## Prerequisites
|
||||
|
||||
To get started, create a new folder on your local disk and install the Python library (xrpl-py) using `pip`.
|
||||
|
||||
```
|
||||
pip3 install xrpl-py
|
||||
```
|
||||
|
||||
Download the python [Quickstart Samples](https://github.com/XRPLF/xrpl-dev-portal/tree/master/_code-samples/quickstart/py/)<!-- {.github-code-download} -->.
|
||||
|
||||
**Note:** Without the Quickstart Samples, you will not be able to try the examples that follow.
|
||||
@@ -44,7 +44,7 @@ This example lets you mint multiple NFTs for a single unique item. The NFT might
|
||||
To batch mint non-fungible token objects:
|
||||
|
||||
1. Enter the **NFT URI**. This is a URI that points to the data or metadata associated with the NFT object. You can use this sample URI if you do not have one of your own: ipfs://bafybeigdyrzt5sfp7udm7hu76uh7y26nf4dfuylqabf3oclgtqy55fbzdi.
|
||||
2. Set the **Flags** field. For testing purposes, we recommend setting the value to _8_. This sets the _tsTransferable_ flag, meaning that the NFT object can be transferred to another account. Otherwise, the NFT object can only be transferred back to the issuing account. See [NFTokenMint](../../../../references/protocol/transactions/types/nftokenmint.md) for available NFT minting flags.
|
||||
2. Set the **Flags** field. For testing purposes, we recommend setting the value to _8_. This sets the _tsTransferable_ flag, meaning that the NFT object can be transferred to another account. Otherwise, the NFT object can only be transferred back to the issuing account. See [NFTokenMint](../../../references/protocol/transactions/types/nftokenmint.md) for available NFT minting flags.
|
||||
3. Enter the **Transfer Fee**, a percentage of the proceeds that the original creator receives from future sales of the NFT. This is a value of 0-50000 inclusive, allowing transfer fees between 0.000% and 50.000% in increments of 0.001%. If you do not set the **Flags** field to allow the NFT to be transferrable, set this field to 0.
|
||||
4. Enter the **Taxon** for the NFT. If you do not have a need for the Taxon field, set this value to 0.
|
||||
5. Enter an **NFT Count** of up to 200 NFTs to create in one batch.
|
||||
@@ -221,7 +221,7 @@ Return the result.
|
||||
|
||||
### configure_account
|
||||
|
||||
This example shows how to set and clear configuration flags using the `AccountSet` method. The `ASF_DEFAULT_RIPPLE` flag is pertinent to experimentation with transfer of issued currencies to third-party accounts, so it is demonstrated here. You can set any of the configuration flags using the same structure, substituting the particular flags you want to set. See [AccountSet Flags](../../../../references/protocol/transactions/types/accountset.md#accountset-flags).
|
||||
This example shows how to set and clear configuration flags using the `AccountSet` method. The `ASF_DEFAULT_RIPPLE` flag is pertinent to experimentation with transfer of issued currencies to third-party accounts, so it is demonstrated here. You can set any of the configuration flags using the same structure, substituting the particular flags you want to set. See [AccountSet Flags](../../../references/protocol/transactions/types/accountset.md#accountset-flags).
|
||||
|
||||
Send the account seed and a Boolean value for whether to enable or disable rippling.
|
||||
```python
|
||||
22
docs/tutorials/python/send-payments/index.md
Normal file
22
docs/tutorials/python/send-payments/index.md
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
html: send-payments-using-python.html
|
||||
parent: modular-tutorials-in-python.html
|
||||
seo:
|
||||
description: Use a Python test harness to send XRP,trade currencies, and more.
|
||||
labels:
|
||||
- Accounts
|
||||
- Cross-Currency
|
||||
- Non-fungible Tokens, NFTs
|
||||
- Payments
|
||||
- Quickstart
|
||||
- Tokens
|
||||
- XRP
|
||||
metadata:
|
||||
indexPage: true
|
||||
---
|
||||
# Send Payments Using Python
|
||||
|
||||
Send XRP and issued currency on the XRP Ledger using JavaScript.
|
||||
|
||||
|
||||
{% child-pages /%}
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
html: send-and-cash-checks.html
|
||||
parent: send-payments-using-python.html
|
||||
blurb: Send checks to facilitate a two-step payment.
|
||||
labels:
|
||||
- Accounts
|
||||
- Quickstart
|
||||
Reference in New Issue
Block a user