Open Lykos153 opened 7 years ago
Facing the same issue here, any workarounds?
@adyanth could you please try PyDrive2 https://github.com/iterative/PyDrive2 - it's a fork that is under active development, and one of the problems we've solved already is caching HTTP connections properly (one per thread to be precise) so that we don't run out of open files, and we don't reestablish them again and again. Let me know if that works for you.
Yeah, that seems to be okay. But after I faced that issue, I searched for other alternatives, and finally found a library fs.googledrivefs, which is a pyfilesystem2 implementation for Google Drive. Best thing about it is, it provides a file system like access vs the list files and IDs in PyDrive. One "disadvantage" would be if you need to multiple files with the same name, which is possible in PyDrive, but not in googledrivefs like any sane file system would not allow.
@adyanth yep, sounds cool. In case of dvc.org (that's where we use PyDrive2) we need a somewhat better control and flexibility over operations we do with a storage, so probably virtual file system library won't be enough.
I'm trying to avoid overhead by re-using an http object for every call. The docs state that it can be used with every method which takes an
param
parameter. It works fine withUpload()
but it doesn't withListFile()
.