Load environmental variables
Hi, i specified path to .env file for solara to load my environmental variables config as follows: solara run --env-file .env main.py
my .env file contains: SOLARA_THEME_SHOW_BANNER=False
but as a result banner "This website runs on Solara" still exists
Setting environmental variable manually does hide the banner, but manually setting configs is not what i want. What am I doing wrong
7 Replies
I read the source code of the
solara command, and although they take env-file as an argument, it doesn't really do anything. The variable env_file is unusedsolara/__main__.py line 274
SeoulSKY
<:issue_open:882464248951877682> [widgetti/solara] --env_file option for 'solara run' command doesn't do anything
I checked the code and realized that the variable
env_file is not used inside run()
Expected Behavior
Load the .env file from the given path
Current Behavior
It doesn't load the .env file from the given path
Specifications
- Solara Version: 1.44.0
- Platform: macOS
- Affected Python Versions: 3.12.4Created
What you can do inside your
main.py to hide the banner is the following:
Hmm, uvicorn should pick up that argument actually!
Hi, it doesnt, does it depend on project structure?