product:config

Show the final resolved configuration of the active product, with origin tracing for every key.


Table of contents

  1. Usage
  2. Options
  3. Example output
    1. Full config
    2. Filter by feature
    3. Filter by key name
  4. How it works
  5. Overwrite warnings
  6. Requirements
  7. See also

Usage

splent product:config [--all] [--feature <name>] [--key <substring>]

Options

Option Description
--all Include Flask internal defaults (e.g. SECRET_KEY, SESSION_COOKIE_NAME).
--feature <name> Show only keys injected by this feature.
--key <substring> Filter keys by substring match (case-insensitive).

Example output

Full config

splent product:config
  my_first_app  [dev]  1 feature(s) injecting config

  KEY                             VALUE                            SOURCE
  ──────────────────────────────────────────────────────────────────────────
  REDIS_URL                       'redis://redis:6379'             feature (splent_feature_redis)
  SESSION_PERMANENT               False                            feature (splent_feature_redis)
  SESSION_TYPE                    'redis'                          feature (splent_feature_redis)
  SQLALCHEMY_DATABASE_URI         'mysql+pymysql://...'            product (my_first_app)
  SQLALCHEMY_TRACK_MODIFICATIONS  False                            product (my_first_app)
  TIMEZONE                        'Europe/Madrid'                  product (my_first_app)
  UPLOAD_FOLDER                   'uploads'                        product (my_first_app)

  ⚠  Overwritten keys:
     SESSION_TYPE: 'filesystem' (product) → 'redis' (feature (splent_feature_redis))

Filter by feature

splent product:config --feature redis

Shows only keys injected by splent_feature_redis.

Filter by key name

splent product:config --key session

Shows only keys containing “SESSION”.


How it works

The framework instruments the configuration pipeline to trace the origin of every key:

  1. Product config (<product>/config.py) – all keys set here are tagged with product (<name>).
  2. Feature config (<feature>/config.py via inject_config(app)) – the FeatureIntegrator snapshots app.config before and after each call. New or changed keys are attributed to the feature.
  3. Flask defaults – keys present in app.config but not in the trace are labeled flask default.

The trace is stored in app.extensions['splent_config_trace'] and includes overwrite history, so the command can warn when a feature silently replaces a product-level value.


Overwrite warnings

When a feature replaces a config key that was already set by the product or another feature, the command shows a warning section:

  ⚠  Overwritten keys:
     SESSION_TYPE: 'filesystem' (product) → 'redis' (feature (splent_feature_redis))

This helps catch silent conflicts between features.


Requirements

  • A product must be selected (splent product:select).

See also


Back to top

splent. Distributed by an LGPL license v3. Contact us: drorganvidez@us.es