Importing JSON file

What I’m trying to do:

Using pyDrive library to access Google Drive Shared, one of the requirements is a Google cloud security key, json file.

I need to import this into my anvil app, I see no way of doing this easily, am I missing something?

Welcome, @chris.houston!

You might want to have a look at Anvil’s Google Drive integration, documented here:

Built-in Integrations

Also, use the Search feature above, to find tutorials, examples, and forum messages that may apply.

1 Like

I saw it, limited use case for that. pyDrive allows so much more and need access to Shared Drives, building an app for a corporation that relies on Shared Drives

will be easy… once I figure out how to import a single file :upside_down_face:

A quick glance through the pydrive source code suggests that it will take a file-like object, so you may be able to write some text to a io.StringIO instance and pass that to the GoogleAuth init method.

Failing that, you could write the necessary content to a temp file and pass its path to GoogleAuth. Docs on that at Anvil Docs | Files, Media and Binary Data