Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Exclude discovery_cache documents #2174

Unanswered
joefarrelly asked this question in Q&A
Discussion options

I'm only making use of the drive, docs, slides and sheets json files from the documents folder. I'm attempting to deploy a serverless app in AWS lambda but won't deploy due to the total size so I'm trying to trim down or use alternative smaller packages. I had a look in google-cloud-python repo for those specific libraries but didn't see them. Apologies if it's a silly question but is there a way to exclude all of the local discovery documents and instead just fetch them as and when needed? Or are these API libraries actually supported in google-cloud-python and I've just missed them.

You must be logged in to vote

Replies: 1 comment 1 reply

Comment options

@joefarrelly Did you solve this? I can't seem to find any Drive integration in the google-cloud-python repo either.

You must be logged in to vote
1 reply
Comment options

For anybody that comes across using this repo with a Lambda, we solved this by excluding the discovery documents in our Serverless config

slimPatterns:
 - 'googleapiclient/discovery_cache/documents/*'

and then initializing the build service disabling static_discovery of the cache documents:

self.service = build(
 "drive",
 "v3",
 static_discovery=False,
 credentials=scoped_credentials)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /