Replies: 1 comment 4 replies
-
i dont see the use case tbh. are there any other interested parties? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
File class takes path of the file on the disk. This assumes that the file to be returned in the File Response already exists. However, if you are exporting some data from the database in the form of csv, a bytes like object of the dataframe is enough to send it as a file. While, it can be done with using generic
Response
class, its OpenAPI schema doesn't show that it returns a file object.Improvement
Just like
pandas.Dataframe.to_csv
path_or_buf
argument also accepts bytes buffer as the parameter, we can have the same functionality here inFile
. What do you think?Beta Was this translation helpful? Give feedback.
All reactions