Skip to main content

System to store application configuration

Project description

acme-config

Description

System to store application configuration

Motivation

To support a release system that can store references to various application artifacts we need a config system that can store environment variables needed by a specific application (i.e. what is put into .env file). Specifically, we want to make the configurations immutable so once they are refered to from a release system they won't change.

Features

  • Uses AWS Parameter Store as a storage layer for parameters
  • Enforces each parameter needs to be assigned to an application identifier (app-name), an environment identifier (env) and a integer version (ver-number)
  • Once parameters are written with such combination of identifiers acme-config prevents from overwriting them.
  • Allows to retreive parameters for a given combination of (app-name, env and ver-number) and stores it in a local file in .env file format convenient for editing.
  • Allows to set parameters from .env file specified at a file path.
  • Each (app-name, env) combination can set a default version number. This can be set with set-version command. Value of this version will be stored in an env var ACME_CONFIG_{app-name.upper()}_{env.upper()}_DEFAULT_VERSION. Value can be retrieved with get-version command.

Example usage

Requires setup of a default AWS profile e.g. via aws sso login. Can be specified via AWS_PROFILE env var.

To set

ac set -app-name acme-config -env dev -ver-number 1 --params-path .env

To set default version

ac set-version -app-name acme-config -env dev -ver-number 1

To get default version

ac get-version -app-name acme-config -env dev

To fetch

ac fetch -app-name acme-config -env dev -ver-number 1

Dev environment

The project comes with a python development environment. To generate it, after checking out the repo run:

chmod +x create_env.sh

Then to generate the environment (or update it to latest version based on state of uv.lock), run:

./create_env.sh

This will generate a new python virtual env under .venv directory. You can activate it via:

source .venv/bin/activate

If you are using VSCode, set to use this env via Python: Select Interpreter command.

Project template

This project has been setup with acme-project-create, a python code template library.

Required setup post use

  • Enable GitHub Pages to be published via GitHub Actions by going to Settings-->Pages-->Source
  • Create release environment for GitHub Actions to enable uploads of the library to PyPi
  • Setup auth to PyPI for the GitHub Action implemented in .github/workflows/release.yml: Link uv publish doc

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

acme_config-0.0.4.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

acme_config-0.0.4-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file acme_config-0.0.4.tar.gz.

File metadata

  • Download URL: acme_config-0.0.4.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.6.0

File hashes

Hashes for acme_config-0.0.4.tar.gz
Algorithm Hash digest
SHA256 6acc5a638c5f307a9cf0f85981971345ebe5de5d9aeb65a92f87510fffe85fd7
MD5 29d5c6ceb6a3fbd8ad38fcfb3a0ced00
BLAKE2b-256 f251cd7d60d9632e140151f2610ae226b5ae7f1acc54dd371b1f5d67d3894346

See more details on using hashes here.

File details

Details for the file acme_config-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for acme_config-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9df240400759475b8e01f748e2db5fe71c98f686c6bc450ac75a05b0f9d06a03
MD5 7a6da3f4f7c86e56d1b9e6176e565a10
BLAKE2b-256 56efb862d4cccb1cbe05f4ba1099c06a7f15d324ece0a064a8e405b4a73cb62f

See more details on using hashes here.

Supported by

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