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.

Export merged environment to yaml

See original GitHub issue

I’m looking for a way to “flatten” the settings into a single values.yaml file from the following settings.yaml.

Assume that ENV_FOR_DYNACONF=development

global:
  a: 1
 
default:
  b: 2

development: 
  foo:
    bar:
      c: 3

production: 
  foo:
    bar:
      c: 4

Desired values.yaml:

a: 1
b: 2
foo:
  bar:
    c: 3

Using print(yaml.dump(settings.as_dict())) works for the top-level keys but the nested keys returned as DynaBox types.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
austinnichols101commented, Jul 18, 2019

My use-case would work perfectly if settings._store was a DynaBox instead of a dict().

0reactions
rochacbrunocommented, Sep 2, 2019

Dynaconf cli already exports as json

dynaconf list -o /tmp/foo.json

We can add more arguments and parsers to that command

example:

dynaconf list -o /tmp/foo.yaml --flat
Read more comments on GitHub >

github_iconTop Results From Across the Web

Export merged environment to yaml · Issue #200 - GitHub
I'm looking for a way to "flatten" the settings into a single values.yaml file from the following settings.yaml.
Read more >
Import/Export Tenant Configuration to YAML File - Auth0
Learn how to use the YAML option for importing and exporting tenant ... By default, the tool merges with your current environment variables...
Read more >
Exporting as YAML - Grafana Tanka
Given multiple environments, one may want to only export the environments that were modified since the last export. This is enabled by passing...
Read more >
Is it possible to import dependencies from a CONDA ...
I realise I can export my current environment as a yml, do a merge with the new yml, and then create a new...
Read more >
How to Export and Load Anaconda Virtual Environments
There's a way around it. You can use Anaconda to export a Python virtual environment to a YAML file you can then reuse...
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