product:params

Table of contents

  1. Introduction
  2. Showing one feature
  3. The layers
  4. Reading what it says under the table
  5. Secrets
  6. Parameters in the model
  7. Reference

Introduction

product:params shows every parameter your product’s features declare in [tool.splent.config_schema], the value it resolves to and the layer that decides it. It reads the files and builds no app, so it is fast and works with the product stopped. It needs a selected product (SPLENT_APP).

splent product:params
  my_product  [dev]  42 parameter(s) of 7 feature(s)
  environment: docker/.env

  KEY                                VALUE                                       LAYER        BIND
  ──────────────────────────────────────────────────────────────────────────────────────────────────────
  shop
    SHOP_SELLS                       ["items"]                                   product      derivation
  notes
    NOTES_PAGE_SIZE                  20                                          default      derivation
    NOTES_PUBLIC_INDEX               false                                       product      runtime
    NOTES_MAX_ATTACHMENT_SIZE        20M                                         product      deploy
  card_payments
    CARD_PAYMENTS_SECRET             ****                                        environment  deploy

  A runtime parameter may be changed in the settings panel, which is not read here.
  Secret values are masked, use --show-secrets to reveal them.

The command exits 0 whatever it finds. product:validate is the check that fails.


Showing one feature

splent product:params --feature notes

--feature takes the short name (notes) or the full one (splent_feature_notes). A feature the product does not have in that environment stops the command with notes is not a feature of my_product in dev.


The layers

The value is resolved as the framework resolves it at boot (Configuration), weakest first.

Layer Where
default The feature’s [tool.splent.config], or the default of its schema
product Your product’s [tool.splent.config]
environment The environment the product’s container gets, docker/.env in development and deploy/.env in production

product:env --merge copies every default and every product value into docker/.env. A value there equal to the product’s, or to the default when the product sets nothing, still counts as theirs. Any other value is the deployment’s decision and wins.

Two layers are not read. Your product’s config.py only runs in the app, and product:config shows it. A runtime parameter may also be changed in the settings panel, whose values live in the database.


Reading what it says under the table

Line Meaning
Drift, the environment overrides what the product decides derivation parameters whose value comes from the environment
✗ KEY (feature): the product's value stops the boot: ... A product value the schema refuses
✗ KEY (feature): the environment's value stops the boot: ... An environment value the schema refuses
✗ KEY (feature): the environment's value is ignored: ... The environment’s value of a runtime parameter does not fit, so the boot ignores it
✗ KEY (feature): required, and neither the product nor the environment sets it A required parameter without a value
Without a [tool.splent.config_schema], so not listed Selected features that declare no schema

Secrets

A parameter of type secret is masked. So is a string whose name says it is one, such as ..._TOKEN or ..._PASSWORD, in case its schema does not mark it. A number, a bool or a list never is.

splent product:params --show-secrets

Parameters in the model

A parameter declared with uvl = true has nodes in the SPL’s feature model (see In the feature model). The value this command shows is the one that selects them in product:validate, product:missing, product:auto-require and product:configure.


Reference

Option Description
--dev, --prod The environment, which chooses the features (the base list and features_<env>) and the environment file. Without either, SPLENT_ENV, and dev when that is unset
--feature NAME Only the parameters of this feature
--show-secrets Print secret values in plain text

Back to top

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