Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Python client library for Stellar

Project Description


Python client library for Stellar

[![PyPI version](](

# Generating keys

account, secret = generate_keypair(password=None)

# Signing and submitting transactions

At the highest level of abstraction there are functions like these,
send_payment(secret, account, destination, amount)
set_regular_key(secret, account, regular_key)

Lower down the operations are separated for easy offline usage,
where you create the transaction json object, sign the transaction,
and then submit it as separate steps.
tc_json = get_payment_tx_json(account, destination, amount)
tx_blob = sign_transaction(secret, tx_json)
res, msg = submit_transaction(tx_blob)

At an even lower level, you can create your own transaction json object,
and have stellar-py take over from there.

import stellar

tx_json = {
'TransactionType': 'Payment',
'Account': account,
'Amount': amount,
'Destination': dest,

tx_blob = stellar.sign_transaction(secret, tx_json)

# Installation

Only tested on Python 2.7

In most cases, this is enough to install:

$ pip install stellar-py

If not, then you might need these too:

$ apt-get install python-pip
$ apt-get install python-dev

Release History

This version
History Node


History Node


Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(6.5 kB) Copy SHA256 Hash SHA256
Source None Sep 3, 2014

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting