Google-api-python-client: Docs for Google Drive API need update, and more examples.

Created on 19 Jun 2018  路  6Comments  路  Source: googleapis/google-api-python-client

To make it short, the doc in python for the version 3 of the API, at least regarding Google Drive, is lacking. The same apply for other langages.

There is 1 example on github, from 2012, for the API v2, and that's it. The only update was for a typo in the readme.

The official doc in google developer pages for V3 doesn't say much despite the number of pages and is lacking example too. You have to look at V2 API to get approximative code which return errors and need a few changes to work.

All in all, You have to put little inconsistent pieces of code from here and there one after another to figure out how it works, even for basic operation like uploading a file.

To resume this rant, the current official doc is poorly designed, doesn't help much and need more exhaustive examples and updated codes.

drive docs

All 6 comments

@stephanepiriou Can you be specific with what changes you're looking for?

We unfortunately, haven't migrated the Drive API code from developers.google.com to GitHub yet. Some upload samples for python are here:
https://developers.google.com/drive/api/v3/manage-uploads

Please state 1-2 specific things you want added or changed.

I'd like to see:

  • full import statements for modules required. For example, the download file page Python references a MediaIoBaseDownload but I don't know what that is.
  • A full example of starting from creating a client to downloading a file, downloading a version, and saving. It's not completely straightforward to a new user that there are several different versions or even modules to use here.
  • A better description for the output - a stream into bytes is different from into a file, for example.
  • an example that uses pagination, meaning looping until nextPageToken isn't set, then stopping appending to some list of files.

Thanks muchly! :)

I would like to see also an example of updating a file

Greetings, we're closing this due to inactivity. Please let us know if the issue needs to be reopened.

I think this issue needs to be reopened - I don't see any of the changes reflected in the Drive API -> https://developers.google.com/drive/api/v3/quickstart/python. As we aren't Google employees, we are not empowered to do a PR or similar, so I'm not sure how there is expected to be any activity?

Thanks!

Was this page helpful?
0 / 5 - 0 ratings