Comments (9)
How is it going with this project?
it is actively maintained, at least as long as `iterative/dvc is alive and maintained.
However I could not find how to get certain fields of a file, like id, name, parents. etc
I assume you already found the file listing API - https://pythonhosted.org/PyDrive/filelist.html#file-listing-made-easy right? Then it already has a small example how to get title
and id
(and the same way you can access other file attributes). Am I missing something in your question?
from pydrive2.
Yes, I can see how get the attributes after the download. But how do you select to only download the attributes you need. Which will reduce data and time needed.
https://developers.google.com/drive/api/v3/reference/files/list
in the docs you can have an parameter 'fields', to select the attributes you need.
from pydrive2.
Have you tried to pass param={"fields": ...}
to the list call? .. I think it should support it as well.
from pydrive2.
Yes I did but got an ApiRequestError.
This is what I tried:
file_list = drive.ListFile({'fields': 'id, name',
'q': "'root' in parents and trashed=false"}).GetList()
from pydrive2.
Try this: 'fields': 'items(id,title)'
- check the API docs for the exact syntax on how to specify the list of fields you'd like to get.
from pydrive2.
Thank you, I see now that you are still using the v2 version. Although this is not clear on the home page.
from pydrive2.
Yes, but I think the syntax for fields is the same across v2 and v3 - check these examples https://developers.google.com/drive/api/v3/fields-parameter
from pydrive2.
Ah oke, I was looking at this one: https://developers.google.com/drive/api/v3/search-files
from pydrive2.
@Cing2 sure. I keep it open with the documentation
label. Hopefully we'll get a contribution to improve it and put some examples.
from pydrive2.
Related Issues (20)
- Cannot install PyDrive2 (Raspberry PI3A+)
- error: from pydrive2.auth import GoogleAuth HOT 7
- How to distinguish between same-named files and directories in Google Drive
- How to distinguish between same-named files and directories in Google Drive HOT 1
- A simple way of initializing a pydrive.GoogleDrive object fails when pydrive is replaced by pydrive2 HOT 1
- Cant copy the file... using service account HOT 3
- Fail to authenticate with pydrive2 to google drive HOT 4
- Access blocked: This application request is invalid HOT 1
- Is there a Google Drive file sharing feature? HOT 3
- Unable to list files with service account auth for GDriveFilesystem HOT 3
- How do I write to specific tab? HOT 1
- fetch a specific folder id by folder name HOT 4
- Missing 1.17.1 release? HOT 1
- auth: LocalWebserverAuth: fail if in non-interactive mode
- ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:2427) HOT 2
- Review and fix issues with find
- Create Succesfull Authentication using Google OAuth client ID for a remote server accessible via SSH in a local machine HOT 1
- AssertionError on using fsspec with service account HOT 1
- [Q]Set Disable Download HOT 1
- Would you be interested to add type hints?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pydrive2.