You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Zachary Smith edited this page Aug 7, 2023
·
8 revisions
After installing the project, some environment setup is required:
Required setup
Create an app.py file containing your script, a config.toml setting the script filepath and entrypoint, and an .envrc file to store project secrets. (Note: remember to add .envrc to your .gitignore). Look for example apps in /examples.
.
├── .envrc
├── config.toml
└── app.py
Create the following simple config.toml:
[script]
filepath = "app.py"entrypoint = "main"# if your app has no entrypoint, remove this parameter.
Add the following environment variables to your .envrc. (Note: remember to activate the .envrc in your terminal using direnv allow)
# server env varsexport PYTHON_WEB_IO_SECRET=""export PYTHON_WEB_IO_CONFIG="config.toml"# defaults to .pythonwebio/config.toml if not set
Generate a random key for PYTHON_WEB_IO_SECRET using this python command line snippet: