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.

Cant load settings file in chalice application

See original GitHub issue

Hi, I am trying to use dynaconf to load config file in a chalice application

I have this folder structure:

chalice_app
└── .env
└── app.py
└── chalicelib
    ├── config
    ├── main.py
    └── settings.toml

in app.py:


#app.py
from dynaconf import settings

print(settings["APP_NAME"])

and settings.toml:


#settings.toml
[default]
APP_NAME="chalice_app"

I tried defining SETTINGS_FILE_FOR_DYNACONF and APP_NAME in .env

SETTINGS_FILE_FOR_DYNACONF=chalicelib/settings.toml

But its not able to find APP_NAME Also its not able lo load .env from root directory or from chalicelib

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
dcifuencommented, Jul 17, 2020

Hello, I was able to make it work with this setup: https://github.com/dcifuen/chalice-dynaconf-helloworld

1reaction
rochacbrunocommented, Jul 17, 2020

That is great @dcifuen we need to add this to the docs, I will include a new section in the docs for those kind of examples.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cant load settings file in chalice application #295 - GitHub
Hi, I am trying to use dynaconf to load config file in a chalice application I have this folder structure: chalice_app └── .env ......
Read more >
Configuration File — AWS Chalice
Whenever you create a new project using chalice new-project , a .chalice directory is created for you. In this directory is a config.json...
Read more >
AWS Chalice using custom config path or custom app path?
When I run chalice local in src folder it says it cannot find the config file: Unable to load the project config file....
Read more >
Configuration File - AWS Chalice - Read the Docs
Whenever you create a new project using chalice new-project , a .chalice directory is created for you. In this directory is a config.json...
Read more >
Configuring custom domain names with AWS Chalice
Let's start by creating a Chalice application with a regional endpoint for ... To do this, update your .chalice/config.json file with the ...
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