Code Monkey home page Code Monkey logo

Comments (1)

gust-p avatar gust-p commented on June 12, 2024

Extra context:

When setting environments=True nothing is accessible, leading to AttributeError. And nothing on the config/config.yaml file is loaded.

header:
  env_filter: None
  key_filter: None
  new_first: 'True'
  history_limit: None
  include_internal: 'False'
current:
  ENVIROMENTS: true
  LOAD_DOTENV: true
  SECRET_KEY: supersecret
  DEVELOPMENT:
    debug: true
    database_url: sqlite:///dev.db
  PRODUCTION:
    debug: false
    database_url: postgres:///prod.db
  ENV: production
history:
- loader: env_global
  identifier: unique
  env: global
  merged: false
  value:
    ENV: production
- loader: toml
  identifier: /home/leno/Repositories/kpi_refactor/config/settings.toml
  env: default
  merged: false
  value:
    DEVELOPMENT:
      debug: true
      database_url: sqlite:///dev.db
    PRODUCTION:
      debug: false
      database_url: postgres:///prod.db
- loader: toml
  identifier: /home/leno/Repositories/kpi_refactor/config/.secrets.toml
  env: default
  merged: false
  value:
    SECRET_KEY: supersecret
- loader: set_method
  identifier: settings_module_method
  env: global
  merged: false
  value:
    SETTINGS_MODULE:
    - config/.secrets.toml
    - config/settings.toml
- loader: set_method
  identifier: envvars_first_load
  env: global
  merged: false
  value:
    ENV_FOR_DYNACONF: production
- loader: set_method
  identifier: init_kwargs
  env: global
  merged: false
  value:
    ENVIROMENTS: true
    LOAD_DOTENV: true
    INCLUDES_FOR_DYNACONF:
    - config/config.yaml
    ENV_SWITCHER_FOR_DYNACONF: APP_ENV
    ENVVAR_PREFIX_FOR_DYNACONF: APP
    SETTINGS_FILE_FOR_DYNACONF:
    - config/.secrets.toml
    - config/settings.toml

With environments=False and preload=["config/config.yaml"]:

header:
  env_filter: None
  key_filter: None
  new_first: 'True'
  history_limit: None
  include_internal: 'False'
current:
  LOAD_DOTENV: true
  ENVIROMENTS: false
  LOCATION: earth
  SECRET_KEY: supersecret
  DEVELOPMENT:
    debug: true
    database_url: sqlite:///dev.db
  PRODUCTION:
    debug: false
    database_url: postgres:///prod.db
  ENV: production
history:
- loader: env_global
  identifier: unique
  env: global
  merged: false
  value:
    ENV: production
- loader: toml
  identifier: /home/leno/Repositories/kpi_refactor/config/settings.toml
  env: default
  merged: false
  value:
    DEVELOPMENT:
      debug: true
      database_url: sqlite:///dev.db
    PRODUCTION:
      debug: false
      database_url: postgres:///prod.db
- loader: toml
  identifier: /home/leno/Repositories/kpi_refactor/config/.secrets.toml
  env: default
  merged: false
  value:
    SECRET_KEY: supersecret
- loader: set_method
  identifier: settings_module_method
  env: global
  merged: true
  value:
    SETTINGS_MODULE:
    - config/.secrets.toml
    - config/settings.toml
- loader: yaml
  identifier: /home/leno/Repositories/kpi_refactor/config/config.yaml
  env: default
  merged: false
  value:
    LOCATION: earth
- loader: set_method
  identifier: envvars_first_load
  env: global
  merged: false
  value:
    ENV_FOR_DYNACONF: production
- loader: set_method
  identifier: init_kwargs
  env: global
  merged: false
  value:
    LOAD_DOTENV: true
    ENVIROMENTS: false
    SETTINGS_FILE_FOR_DYNACONF:
    - config/.secrets.toml
    - config/settings.toml
    ENVVAR_PREFIX_FOR_DYNACONF: APP
    PRELOAD_FOR_DYNACONF:
    - config/config.yaml
    MERGE_ENABLED_FOR_DYNACONF: true
    ENV_SWITCHER_FOR_DYNACONF: APP_ENV

from dynaconf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.