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-configprevents from overwriting them. - Allows to retreive parameters for a given combination of (
app-name,envandver-number) and stores it in a local file in.envfile format convenient for editing. - Allows to set parameters from
.envfile specified at a file path. - Each (app-name, env) combination can set a default version number. This can be set with
set-versioncommand. Value of this version will be stored in an env varACME_CONFIG_{app-name.upper()}_{env.upper()}_DEFAULT_VERSION. Value can be retrieved withget-versioncommand.
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
releaseenvironment 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: Linkuv publishdoc
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file acme_config-0.0.6.tar.gz.
File metadata
- Download URL: acme_config-0.0.6.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.6.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b6e8948de6bf4e85fd0e55498821053ffe9aa63e79f21efa6fb7dc76f75ac10
|
|
| MD5 |
08e2594f43b56df8a865fdc8fa0732e7
|
|
| BLAKE2b-256 |
ed41e0ae74798d013002efbb3f380c113739909fd41b8c952c8d47dbdd41a1b6
|
File details
Details for the file acme_config-0.0.6-py3-none-any.whl.
File metadata
- Download URL: acme_config-0.0.6-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.6.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0293dc8c622921a422ffd2791989225f41168363660582f1d7fabdba3db35acb
|
|
| MD5 |
cc2d991f728fafeb3ec04b555a20dd66
|
|
| BLAKE2b-256 |
05034a65253fb77d53fa6e0f0d7fdddb437b39d7ce1d5385c0b533b625d0e36b
|