py-stellar-sdk is a Python library for communicating with a Stellar Horizon server. It is used for building Stellar apps on Python.
It provides:
- a networking layer API for Horizon endpoints.
- facilities for building and signing transactions, for communicating with a Stellar Horizon instance, and for submitting transactions or querying network history.
Install from pypi:
pip install -U stellar-base
Install from latest source code(may be unstable):
pip install -U git+git://github.com/StellarCN/py-stellar-base
# Alice pay 10 XLM to Bob
from stellar_base.builder import Builder
alice_secret = 'SCB6JIZUC3RDHLRGFRTISOUYATKEE63EP7MCHNZNXQMQGZSLZ5CNRTKK'
bob_address = 'GA7YNBW5CBTJZ3ZZOWX3ZNBKD6OE7A7IHUQVWMY62W2ZBG2SGZVOOPVH'
builder = Builder(secret=alice_secret)
builder.add_text_memo("Hello, Stellar!").append_payment_op(
destination=bob_address, amount='10', asset_code='XLM')
builder.sign()
response = builder.submit()
print(response)
- Quick Start: https://stellar-base.readthedocs.io/en/latest/quickstart.html
- API: https://stellar-base.readthedocs.io/en/latest/api.html
- Examples: https://github.com/StellarCN/py-stellar-base/tree/master/examples
- Releases: https://pypi.org/project/stellar-base/
- Code: https://github.com/StellarCN/py-stellar-base
- Issue tracker: https://github.com/StellarCN/py-stellar-base/issues
- License: Apache License 2.0
Thank you to all the people who have already contributed to py-stellar-base!