File
class File
An interface for working with files on Redivis. When the constructor is called directly, a file_id
must be provided. Also returned by listing files associated with a particular table or query result.
Constructors
| List files contained within a query result. The query result must contain at least one file_id variable. |
| Construct a reference to a file based on its globally unique id. |
| List files contained within a file index table. The table must contain at least one file_id variable. |
Examples
Fields
| The globally unique identifier for the file, as a string. |
| A reference to the query from which this file was loaded from. Will only be populated if constructed via Query.list_files |
| A dict containing the API resource representation of the project. This will be fully populated after calling File.get(), containing the following properties:
|
| A reference to the table from which this file was loaded from. Will only be populated if constructed via Table.list_files. |
Methods
| Download the file. |
| Read the file contents into memory, either as raw bytes (the default) or as a string if as_text=True. |
| Read the file in a streaming manner, repeatedly calling the callback function with the latest chunk of bytes. |
Last updated