-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Exclude discovery_cache documents #2174
-
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.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 1 reply
-
@joefarrelly Did you solve this? I can't seem to find any Drive integration in the google-cloud-python repo either.
Beta Was this translation helpful? Give feedback.
All reactions
-
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)
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1