Write Streamlit app file
fastero_write_streamlit_fileCreate or replace one file of a Streamlit app, leaving its other files as they are; fastero_replace_streamlit_files replaces the whole set instead, deleting what it leaves out, and fastero_get_streamlit_app reads the current files. path is the folder inside the app ('.' for the top level) and name the file name; the top-level app.py is the file the platform runs. A running app picks up the change in about 5 seconds; a changed requirements.txt applies on the next start, which fastero_run_streamlit_app makes. This tool refuses a Python file that calls socket., subprocess., os.setuid, exec( or eval( (which includes df.eval and pd.eval), and a file whose name ends in .exe, .bat, .sh, .conf, .key, .sql, .php, .msi, .com or .dll. An app imported from Git keeps the edit across its starts until it's sent to its repository as a pull request, or discarded, from the app's workspace. Returns written, the app's new version and the file's path and name. Owners, admins and editors of the project can write files.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The file's name with its extension, such as 'app.py' or 'requirements.txt': no slashes, and not starting with a dot. | |
| path | No | Folder inside the app; '.' (the default) is the top level. | |
| appId | Yes | A Streamlit app’s id, from fastero_list_streamlit_apps. | |
| content | Yes | The whole file text, replacing any file of that path and name. | |
| projectId | Yes | The project’s id, from fastero_list_projects. |