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.

Question: How do you use autocomplete with dynaconf?

See original GitHub issue

Hello! First of all, great project, love the feel, idea and execution!

To the question- How do you use autocomplete with IDEs (PyCharm in my case) when using dynaconf? from dynaconf import settings gets its attributes on execution and I get that, but it takes away so much with it… The autocomplete plus the IDE not being able to tell if there’s a variable like that at all.

Or am I just missing something?

Because I already had a (quite long) settings.py file before introducing dynaconf and I wanted just to take out some vars and tuck them into separate files, I just set their values as: VAR_1 = dynaconf_settings.VAR_1

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
ynouricommented, Apr 5, 2021

Hi! My team is looking to adopt a new configuration framework and DynaConf looks really good. One of our goals is to maximize productivity, for example through code completion available in the IDE (e.g. PyCharm or VS Code).

settings.toml:

[foo]
bar = 1

my_app.py

from config import settings

# When I type "settings.", IDE should suggest "foo"
settings.foo.bar

I was initially thinking that this issue was about to enable this behavior, but after testing with dynaconf==3.1.4 and PyCharm 2020.3.5, I realized that I might have misinterpreted the scope of this specific feature. I can see that the foo is present at execution, but is there anyway to make it appear in IDE’s autocompletions at coding time?

Thanks!

2reactions
timovanastencommented, Apr 29, 2022

Would very much like the IDE to autocomplete the settings as well! Would be a big boost to productivity

Read more comments on GitHub >

github_iconTop Results From Across the Web

Question: How do you use autocomplete with dynaconf? #298
Hello! First of all, great project, love the feel, idea and execution! To the question- How do you use autocomplete with IDEs (PyCharm...
Read more >
Get Constants out of configuration File in a global namespace ...
One best practice is to use configuration files (ini, yaml...) to store those constants. If I use those files, there are a lot...
Read more >
Release Notes - Dynaconf - 3.1.11
Fixed a problem when multiple combined validators are registered and fixed ... Sometimes you need some values to be computed by calling ...
Read more >
Dynaconf - Easy and Powerful Settings Configuration for ...
Powerful $ dynaconf CLI to help you manage your settings via console. Customizable Validation System to ensure correct config parameters. Allow the change...
Read more >
dynaconf - Bountysource
Hello! First of all, great project, love the feel, idea and execution! To the question- How do you use autocomplete with IDEs (PyCharm...
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