Read Python file
fastero_read_python_fileRead one file of a Python project: a picture (PNG, JPEG, GIF or WebP), such as a chart a run saved in outputs/, comes back as an image with its mimeType, bytes and source; anything else as text. Text returns content, decoded as UTF-8, and source: local for a file stored in Fastero (written here, or saved by a run), git for one read from the linked repository's branch; a stored file is read in place of the repository's at the same path. Read a file here before fastero_write_python_file, which replaces the whole file; the path, relative to the project's root, comes from fastero_list_python_files. Uploaded project files such as spreadsheets are read with fastero_read_file, and notebooks with fastero_read_notebook. A file over 1,000,000 bytes is refused, with its size, rather than cut, since writing a cut copy back would lose the rest, and a path outside the project is refused. Any project member, viewers included, can read it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path inside the project, e.g. 'main.py' or 'src/report.py'. | |
| projectId | Yes | The project’s id, from fastero_list_projects. | |
| pythonProjectId | Yes | A Python project’s id, from fastero_list_python_projects. |