Stellar Python SDK
py-stellar-base is a Python library for communicating with a Stellar Horizon server and Stellar RPC server. It is used for building Stellar apps on Python. It supports Python 3.10+ as well as PyPy 3.11.
It provides:
a networking layer API for Horizon endpoints.
a networking layer API for Stellar RPC server methods.
facilities for building and signing transactions, for communicating with a Stellar Horizon and Stellar RPC instance, and for submitting transactions or querying network history.
Quickstart
At the absolute basics, you’ll want to read up on Stellar’s Documentation Guides, as it contains a lot of information on the concepts used below (Transactions, Payments, Operations, KeyPairs, etc.).
API Documentation
Here you’ll find detailed documentation on specific functions, classes, and methods.
- API Documentation
- Account
- Address
- Asset
- Call Builder
- Call Builder Async
- Client
- Contract
- Exceptions
- Keypair
- LiquidityPoolAsset
- LiquidityPoolId
- Memo
- MuxedAccount
- Network
- Operation
- Price
- Server
- ServerAsync
- Signer
- SignerKey
- StrKey
- TimeBounds
- DecoratedSignature
- Transaction
- TransactionEnvelope
- FeeBumpTransaction
- FeeBumpTransactionEnvelope
- TransactionBuilder
- SorobanDataBuilder
- SorobanServer
- SorobanServerAsync
- Soroban RPC Definitions
- scval
- Auth
- Helpers
- Stellar Ecosystem Proposals
- stellar_sdk.xdr
stellar-model
stellar-model allows you to parse the JSON returned by Stellar Horizon into the Python models, click here for more information.
Links
Document: https://stellar-sdk.readthedocs.io
Examples: https://github.com/StellarCN/py-stellar-base/tree/main/examples
Issue tracker: https://github.com/StellarCN/py-stellar-base/issues
License: Apache License 2.0
Releases: https://pypi.org/project/stellar-sdk/
Thanks
This document is based on Stellar JavaScript SDK documentation. Thank you to all the people who have already contributed to Stellar ecosystem!