Run modes
You can run a Peliqan script (data app) in different ways:- Interactive run: click the “Save & Run” button in the top menu above the script editor in Peliqan > Run interactively (Streamlit)
- Background run (manual or scheduled): configure a schedule for your script or use the “Run in background” option from the “Save & Run” button
- Publish API endpoint: make your script available as a public API endpoint. More info: Publish APIs
- Run outside of Peliqan: use the Peliqan pip module. Click here for more info on local development.
- Published apps & apps pinned to homepage: these also use Interactive runs (Streamlit).
Scheduling runs
Use the “Schedule” menu option in the top menu of the script editor, activate the schedule and choose an interval:- 1 minute
- 5 minutes
- 15 minutes
- 30 minutes
- 1 hour
- 6 hours
- 12 hours
- 24 hours
View logs
For each run of your script, you can view the logs under the “Logs” menu item:Write to logs
Useprint() statements in your apps to write to the logs. This will work in any type of app: Streamlit interactive apps, background runs, API handlers scripts.
Inside Peliqan, Streamlit is automatically imported as st. If you use Streamlit for output in your script, it will automatically be converted to print() statements when using background runs. Examples:
st.write()st.json()st.text()st.title()st.header()st.subheader()st.table()
print() statement which writes to the logs, when using a background run. If you want to also do logging in interactive mode, you need to add additional print() statements in your code.
print() statements in interactive Streamlit runs will write to the log, but will not show up to the user in the UI so you need to use a combination of both if needed.
