Last updated Jul 5, 2022

First Steps

Installation

Ensure you're running at least Python 3.8.0 to get the latest version of Sovereign

1
2
$ python --version
Python 3.8.2

If you haven't done so already, you can install Sovereign via pip

1
2
python -m pip install sovereign

Configuration

The main things you'll need in order to run Sovereign are:

Start by creating an somewhat empty YAML configuration file at the location /etc/sovereign.yaml

1
2
sources: []
templates: {}

Loadable paths

Throughout the upcoming documentation you may see references to "Loadable paths"

These are paths that Sovereign uses to dynamically include data in configuration.

They are specified in the following way:

1
2
protocol: <type of loader used>
serialization: <serializer used to decode the data>
path: <location of the data>

Most sections that ask you to use a loadable path will provide an example.

Types of loaders available

File TypeDescription
fileLocal file
envEnvironment Variable
http/httpsHTTP location
modulePython module path
pythonRaw Python code
pkgdataPython Package Data
s3S3 bucket
inlineInline data

Serializations available

SerializerBehavior
yamlyaml.safe_load(data)
jsonjson.loads(data)
orjsonorjson.loads(data)
ujsonujson.loads(data)
jinjajinja2.Environment().from_string(data)
jinja2jinja2.Environment().from_string(data)
stringstr(data)
rawdata

Rate this page: