You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
download_file and upload_file function names are misleading.
The problem with download_file is that while it does consume a storage bucket blob, it does not write to a file, it just returns bytes.
The problem with upload_file is that from the name one would expect the input to the function to be a filename, but it is actually bytes.
Maybe its not that straight forward.
We decided not to call the blobs in storage bucket for blobs, but for files. Which kind of led to the names upload_file and download file.
Not a 100% sure how to move forward. My issue when i looked into changing it was this:
So then maybe we should change the argument names aswell. But if we do that we should create a consistent naming standard and we should probably just follow what google does... Calling a blob a blob is probably just the easiest way forward where a blob is data in a storage bucket and a file is data stored in a conventional way.
Is your feature request related to a problem? Please describe.
download_file
andupload_file
function names are misleading.The problem with
download_file
is that while it does consume a storage bucket blob, it does not write to a file, it just returns bytes.The problem with
upload_file
is that from the name one would expect the input to the function to be a filename, but it is actually bytes.Describe the solution you'd like
Clearer api.
upload
- inputdata: str | bytes
upload_from_file
- inputfilename: str
download
- returnsstr | bytes
download_to_file
- returnfilename: str
or absolute path to the file.or have string and bytes spesific functions as well. but that might be a bit overkill.
The text was updated successfully, but these errors were encountered: