OpenViSTAI · Agents · Blockchain · Crypto
Menu
Developer Tools

Py Stellar Base

Py Stellar Base is a Python SDK for communicating with Stellar Horizon and Stellar RPC servers. It provides networking interfaces for their endpoints and methods, along with functions to query network history and build, sign and submit transactions.

Independent OpenViST project profile, based on linked sources.

Py Stellar Base — OpenViST project profile in Developer Tools.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when a Python application needs to connect to Horizon or RPC for Stellar network data or transaction workflows.

Who it is for

  • Python developers building applications that interact with Stellar Horizon or Stellar RPC.
  • Teams implementing Stellar transaction and network-data workflows in Python.

Documented uses

  • Query Stellar network history through Horizon or RPC.
  • Construct and sign Stellar transactions.
  • Submit signed transactions to a Stellar server.
Before you choose

Requirements & limits

The repository is public and identifies the project as open source under Apache-2.0. The README lists Python 3.10+ and PyPy 3.11 support.

  • It is a library for application development, not a hosted end-user service.
  • The README provides separate package extras for asynchronous use and Shamir backup support.
  • Soroban binding generation and Horizon JSON parsing are attributed to related projects, stellar-contract-bindings and stellar-model.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install the Stellar Python SDK

Add the SDK to a Python project, choosing the documented optional dependency when asynchronous use or Shamir backup support is needed.

Before you start

  • Python 3.10+ or PyPy 3.11
  • A Python environment in which to install packages

Steps

  1. Install the package with the command below.

    Documented command
    pip install --upgrade stellar-sdk
  2. For asynchronous use, install with the command below instead.

    Documented command
    pip install --upgrade stellar-sdk[aiohttp]
  3. For Shamir backup support, install with the command below instead.

    Documented command
    pip install --upgrade stellar-sdk[shamir]

Expected outcome

The documented stellar-sdk package and, when selected, its asynchronous or Shamir backup dependencies are installed.

Guide limitations

  • These steps cover installation only, not connection setup or transaction execution.
  • The README recommends specifying the major version in the dependency file to avoid unknown effects from breaking changes.
Source-based practical guide

Build and submit a testnet XLM payment

Follow the README example to construct, sign and submit an XLM payment through a Stellar Horizon testnet server.

Before you start

  • Python 3.10+ or PyPy 3.11
  • The installed stellar-sdk package
  • A Stellar account keypair and recipient address
  • A connection to the Horizon testnet server used in the example

Steps

  1. Create the sender keypair and recipient address, then connect to https://horizon-testnet.stellar.org.

  2. Load the sender account and initialize a transaction builder with the testnet network passphrase and base fee.

  3. Add the payment operation, set a timeout and build the transaction.

  4. Sign the transaction with the sender keypair and submit it through the server.

Expected outcome

The example submits a signed 10.25 XLM payment to Horizon testnet and prints the server response.

Guide limitations

  • The example is explicitly a testnet workflow; it does not document a mainnet configuration.
  • The README example includes a secret-key literal; use appropriately controlled credentials for any real account.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
10 October 2026
Original website title
StellarCN/py-stellar-base · Official homepage title · retained in its source language