Skip to content

The safe-config-service is a service that provides configuration information in the context of the Safe clients environment

License

Notifications You must be signed in to change notification settings

safe-global/safe-config-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,336 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

safe-config-service

Coverage Status

The safe-config-service is a service that provides configuration information in the context of the Safe clients environment (eg.: list of available safe apps and chain metadata).

Requirements

Setup

In order to start the server application:

1. Install the required Python dependencies. Eg.: With a python virtual environment:

python -m venv venv # creates a virtual environment venv in the local directory
source venv/bin/activate
pip install -r requirements-dev.txt
pip install setuptools

2. Launch the Postgres database image

docker compose up -d db

3. Execute pending database migrations

python src/manage.py migrate

4. Create an admin user

The admin interface of the service will be available under http://localhost:8000/admin but you need to have an admin registered before you are able to access the panel.

To create an admin user:

python src/manage.py createsuperuser

5. Launch the service:

python src/manage.py runserver

By default the service will be available under http://127.0.0.1:8000/

Configuration

The service is already configured for development purposes however if you wish to deploy it in a production environment you should set some sensitive parameters such as: POSTGRES_USER , POSTGRES_PASSWORD, SECRET_KEY. DEBUG should be set to false.

We provide the .dev.env file which explains the role of each environment variable. You can set the configuration using this file and read it in terminal session where the application will be executed.

Testing

Pytest is used to run the available tests in the project. Some of these tests validate the integration with the database so having one running is required. From the project root:

docker compose up -d db
pytest src

Code Style Formatter and Linter

Code formatting and linting are enforced before every commit using pre-commit.

To manually trigger the checks, run:

pre-commit run --all-files

Licensing

This repository contains code developed under two different ownership and licensing regimes, split by a defined cut-over date.

  • Up to and including February 16, 2026 Code is © Safe Ecosystem Foundation and licensed under the MIT License. The final SEF-owned MIT snapshot is tagged as: sef-mit-final
  • From February 17, 2026 onward New development is © Safe Labs GmbH and licensed under the Functional Source License, Version 1.1 (MIT Future License).

Users who require a purely MIT-licensed codebase should base their work on the sef-mit-final tag. The historical MIT-licensed code remains MIT and is not retroactively relicensed.

For full details, see LICENSE.md and NOTICE.md.

About

The safe-config-service is a service that provides configuration information in the context of the Safe clients environment

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors 19

Languages