Skip to main content

Code for managing Stellar.org blockchain transactions and accounts using stellar-base in python. Allows full functionality interfacing with the Horizon front end. Visit https://stellar.org for more information.

Project description

PyPI Travis (.org) Read the Docs Codecov

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.

Installing

Install from pypi:

pip install -U stellar-sdk

Install from latest source code(may be unstable):

pip install git+git://github.com/StellarCN/py-stellar-base

A Simple Example

# Alice pay 10.25 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.25', asset_code='XLM')
builder.sign()
response = builder.submit()
print(response)

Document

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stellar-sdk-extra-0.0.0.tar.gz (117.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page