Skip to main content

A SEP-24-compliant Django anchor server

Project description

Polaris Documentation

What is Polaris?

.. _SEP-24: .. _Stellar Development Foundation: .. _github: .. _stellar-anchor-server:

Polaris is an implementation of SEP-24_ maintained by the Stellar Development Foundation_ (SDF). SEP-24 is a standard defined to make wallets and anchors interoperable, meaning any wallet can communicate with any anchor for the purpose of withdrawing or depositing assets into the stellar network.

Polaris is not a library or a framework; its an extendable django app. Like many django apps, it comes with fully-implemented endpoints, templates, and database models. As a developer using Polaris, you don't need to know everything about how Polaris is implemented, even though the project is completely open source and available at the SDF's github_.

Polaris does not aim to give you full control of the SEP-24_ implementation. Instead, Polaris provides several base classes for integrating with its already-implemented functionality, similar to a framework. This documentation focuses on the parts of Polaris you will need to use in order to fully implement the SEP-24_ protocol.

For an example on how to use Polaris, see the SDF's stellar-anchor-server_.


First make sure you have cd'ed into your django project's main directory and then run ::

pip install django-polaris

Add it to INSTALLED_APPS in ::


Define PROJECT_ROOT in your project's Polaris uses this to find your .env file. ::

PROJECT_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

Paste the text below into PROJECT_ROOT/.env. The stellar-anchor-server_ repository contains instructions for modifying this file to fit your use case. ::


# STELLAR_NETWORK_PASSPHRASE can either be "Test SDF Network ; September 2015" or
# "Public Global Stellar Network ; September 2015" or a custom passphrase
# if you're using a private network.
STELLAR_NETWORK_PASSPHRASE="Test SDF Network ; September 2015"
# HORIZON_URI can point to a custom Horizon URI. It currently points
# to the testnet URL.

Add the Polaris endpoints in ::

import polaris.urls
from django.urls import path, include

urlpatterns = [
    path("", include(polaris.urls)),

Run migrations: python migrate

You now have Polaris completely integrated into your Django project!

Contributing and Testing

To set up the development environment ::

pip install pipenv
git clone
cd django-polaris
pipenv install --dev

Git Flow

Follow the instructions below to submit a valid pull request.

  • Fork the repository
  • Make your changes
  • Push your changes to your forked repository
  • Create a pull request based off master



pipenv run pytest

Project details

Download files

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

Files for django-polaris, version 0.9.7
Filename, size File type Python version Upload date Hashes
Filename, size django-polaris-0.9.7.tar.gz (47.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page