Autocomplete from YAML file.

Answered

Hello, I have a project that used a configuration file in yaml format.

for example:

conf.yaml:
server:
  address: 192.168.1.1
  port: 1234
  username: some_user
  password: some_pass
query:
  body: some_string
  index: some_index

main.py:
import yaml
with open('./conf.yaml', 'r') as infile:
    conf = yaml.load(infile)

Is it possible to have PyCharm autocomplete/suggest when I type "conf[]" based on the entries in conf.yaml?

2 comments
Comment actions Permalink

Unfortunately, it's not possible now. Please feel free to file a feature request about it to Pycharm issue tracker: https://youtrack.jetbrains.com/issues/PY.

0
Comment actions Permalink

Is this possible now (thanks to SchemaStore.org integration)? 

0

Please sign in to leave a comment.