Skip to main content

A type-safe hierarchical configuration management system for AWS projects that provides environment-specific inheritance, validation, and integrated deployment to AWS SSM Parameter Store and S3 with custom versioning.

Project description

Documentation Status https://github.com/MacHu-GWU/aws_config-project/actions/workflows/main.yml/badge.svg https://codecov.io/gh/MacHu-GWU/aws_config-project/branch/main/graph/badge.svg https://img.shields.io/pypi/v/aws-config.svg https://img.shields.io/pypi/l/aws-config.svg https://img.shields.io/pypi/pyversions/aws-config.svg https://img.shields.io/badge/✍️_Release_History!--None.svg?style=social&logo=github https://img.shields.io/badge/⭐_Star_me_on_GitHub!--None.svg?style=social&logo=github
https://img.shields.io/badge/Link-API-blue.svg https://img.shields.io/badge/Link-Install-blue.svg https://img.shields.io/badge/Link-GitHub-blue.svg https://img.shields.io/badge/Link-Submit_Issue-blue.svg https://img.shields.io/badge/Link-Request_Feature-blue.svg https://img.shields.io/badge/Link-Download-blue.svg

Welcome to aws_config Documentation

https://aws-config.readthedocs.io/en/latest/_static/aws_config-logo.png

aws_config is a well-defined configuration management framework for multi-environment applications that uses AWS services as the configuration backend. This library is built from years of Amazon best practices for managing application configurations at scale.

The framework provides hierarchical configuration management with inheritance, automatic parameter generation for different environments (dev, test, prod), and seamless integration with AWS SSM Parameter Store and S3. It eliminates configuration drift between environments while maintaining security through proper secret management.

Key benefits include type-safe configuration classes, environment-specific parameter validation, automated deployment to AWS backend services, and built-in configuration inheritance that reduces duplication across environments.

from aws_config import BaseConfig, BaseEnv, BaseEnvNameEnum
from pydantic import Field

class EnvNameEnum(BaseEnvNameEnum):
    dev = "dev"
    prod = "prod"

class Env(BaseEnv):
    username: str = Field()
    password: str = Field()

class Config(BaseConfig[Env, EnvNameEnum]):
    pass

config = Config(
    data={
        "_defaults": {
            "*.project_name": "my_app",
        }
        "dev": {
            "username": "alice"
        },
        "prod": {
            "username": "bob"
        }
    },
    secret_data={
        "dev": {
            "username": "alice-pwd"
        },
        "prod": {
            "username": "bob-pwd"
        }
    },
    EnvClass=Env,
    EnvNameEnumClass=EnvNameEnum,
)
env = config.get_env(EnvNameEnum.dev)

Install

aws_config is released on PyPI, so all you need is to:

$ pip install aws-config

To upgrade to latest version:

$ pip install --upgrade aws-config

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

aws_config-0.1.5.tar.gz (35.1 kB view details)

Uploaded Source

Built Distribution

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

aws_config-0.1.5-py3-none-any.whl (38.0 kB view details)

Uploaded Python 3

File details

Details for the file aws_config-0.1.5.tar.gz.

File metadata

  • Download URL: aws_config-0.1.5.tar.gz
  • Upload date:
  • Size: 35.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for aws_config-0.1.5.tar.gz
Algorithm Hash digest
SHA256 99f8219e1a1c5bb581c9755e78e5f4a7d15c044d5973f1cd18638ab8cb6a64d2
MD5 2dcfe812879a5eeb71125924db8588e7
BLAKE2b-256 8219dbe56718a040568f88a993b082ab8d0961d8c0b699b3cfa561d244a46cda

See more details on using hashes here.

File details

Details for the file aws_config-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: aws_config-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 38.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for aws_config-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9ca2a49c13f80cc02ed45fa4b686cf223159b9028656c4ca3f502ec129227304
MD5 2ce4acf777cee18e632636b1b23bd30f
BLAKE2b-256 8b2c9085110793d732687aade28cb90a76bc7bfa60330f1bce24c3e0754f7507

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