question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proposal: dict config

See original GitHub issue

Since dictionary configs become very popular (like django.conf.settings.DATABASES) or logging configuration style, shouldn’t it be better to make one setting like a SESSION_REDIS which will looks like this?

SESSION_REDIS = {
    'HOST': 'localhost',
    'PORT': 6379,
    'DB': 0,
    'PREFIX': 'session',
}

Also, like in a Django, if HOST starts with a ‘/’, it would assumes, that it is an Unix socket, and empty string should assumes an localhost address.

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
martinrusevcommented, Sep 6, 2017

Supported in the latest release 0.6. Configuration through env variables will be considered for a next release

1reaction
merwokcommented, Apr 12, 2017

As long as one can create a dict from an environment variable!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tutorial 1: Learn about Configs - MMAction2's documentation!
Some config dicts are composed as a list in your config. For example, the training pipeline data.train.pipeline is normally a list e.g. [dict(type='SampleFrames ......
Read more >
python - logging.config.dictConfig does not seem to work
What is wrong with this code? It prints out Whatsup to the stdOut, and nothing to the file in /tmp. It creates the...
Read more >
logging.config — Logging configuration
Takes the logging configuration from a dictionary. The contents of this dictionary are described in Configuration dictionary schema below.
Read more >
Configuration - Ads API
Configuration using YAML file · Configuration using environment variables · Configuration using a YAML string · Configuration using a dict · Configuration Fields....
Read more >
Config Dictionary in ReFramework without Excel
By using this package you can get the contents of Data\Config.xlsx file in the Config (Dictionary<String,Object>) without using Excel.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found