Install & Compatibility
Where this runs
tested against v14.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 1.776s · 46MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 5.1s · import 1.566s · 46MB
45MB installed
● package 45MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Server
✓ from stellar_sdk.server import Server
✗ from stellar_sdk import Server
Server was moved to stellar_sdk.server in v10+
TransactionBuilder
✓ from stellar_sdk.transaction_builder import TransactionBuilder
Always use explicit import path
Keypair
✓ from stellar_sdk.keypair import Keypair
Keypair is in its own module
SorobanServer
✓ from stellar_sdk.soroban_server import SorobanServer
For Soroban RPC interactions
Generate a random keypair and load its account from the testnet.
from stellar_sdk.keypair import Keypair
from stellar_sdk.server import Server
server = Server(horizon_url="https://horizon-testnet.stellar.org")
keypair = Keypair.random()
print(f"Public: {keypair.public_key}, Secret: {keypair.secret}")
account = server.load_account(keypair.public_key)
print(f"Sequence: {account.sequence}")
Errors
Common errors & fixes
AttributeError: module 'stellar_sdk' has no attribute 'Server'
Server is not directly under stellar_sdk; it's in a submodule.
fixUse `from stellar_sdk.server import Server`
stellar_sdk.exceptions.NotFoundError: Resource not found
Using a public network Horizon URL for a testnet account, or vice versa.
fixMatch the horizon_url to the network: testnet -> https://horizon-testnet.stellar.org, public -> https://horizon.stellar.org
stellar_sdk.exceptions.BadRequestError: ... "op_no_destination"
Payment operation has no destination account or invalid destination.
fixEnsure the destination account exists on the network and is a valid Stellar address.
Upgrade
Version history
14.1.0latest on PyPI · released Jun 3, 2026
Audit
Dependencies
aiohttprequiredasync HTTP client for Stellar RPC
cryptographyrequiredkey generation and signing