Practical overview
When it fits
Use it when a Python application needs to make Terra blockchain requests or incorporate transaction and smart-contract operations.
Who it is for
- Python developers building software that interacts with Terra.
- Developers who need synchronous or asynchronous LCD requests in an application.
Documented uses
- Connect a Python application to a Terra node.
- Read blockchain information and paginated data.
- Construct, sign and send transactions.
- Deploy or interact with smart contracts.
Requirements & limits
- Blockchain interaction requires a connection to a Terra node.
- AsyncLCDClient uses awaited request methods and has a session lifecycle to manage.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install Terra SDK and connect a Python client
Install the SDK, configure an LCDClient, and request blockchain information.
Before you start
- Python environment with pip
- Connection to a Terra node, using the chain ID and LCD URL appropriate to the intended network
Steps
Install the package with the command below; the documentation recommends using a virtual environment.
pip install terra-sdkCreate an LCDClient with a chain ID and node URL.
Use the client to request blockchain information, such as the latest block height.
Expected outcome
A configured Python client that can make requests to a Terra node.
Guide limitations
- The guide requires access to a Terra node.
- The example uses the Columbus-5 chain ID and https://lcd.terra.dev.
Make asynchronous LCD requests
Use AsyncLCDClient in a Python coroutine to request Terra data without blocking.
Before you start
- Terra SDK installed in a Python environment
- An asyncio coroutine and a Terra LCD endpoint
Steps
Create an AsyncLCDClient with the LCD URL and chain ID inside a coroutine.
Await the desired module request, such as a bank total-supply query.
Close the client session, or use the documented async context manager to manage teardown.
Expected outcome
An asynchronous LCD request with the client session lifecycle handled.
Guide limitations
- Module and wallet API functions that make LCD requests must be awaited.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 28 November 2026
- Original website title
- Introduction — Terra SDK 2.0.3 documentation · Official homepage title · retained in its source language

