-
Notifications
You must be signed in to change notification settings - Fork 0
Quickstart
Zachary Smith edited this page Apr 30, 2023
·
8 revisions
After installing the project, some environment setup is required:
Create an app.py
file containing your script, and an .envrc
file to store project secrets. (Note: remember to add .envrc
to your .gitignore
)
Look for example apps in ./python_web_io/tests
.
.
├── .envrc
└── app.py
Add the following environment variable to your .envrc
. (Note: remember to activate the .envrc
in your terminal using direnv allow
)
Alternatively, run the command in your terminal to set the environment variable for a single session.
export FLASK_SECRET_KEY="_5#y2L"
Installed using pip
, you can call python-web-io
as a CLI tool:
python_web_io
Using poetry
, you can call it via:
poetry run python_web_io
Whilst python-web-io
is fully configurable via config.toml
, some CLI arguments are made available for when using a non-default config.toml
path, or testing an app.
Argument | ||
---|---|---|
--script="example.py" |
Optional | Specify the file path for the app Python script. |
--config="/.pythonwebio/config.toml" |
Optional | Specify the file path for the app Python script. |
--debug |
Optional | Run the Flask server with debug output enabled. |