Created
January 7, 2022 19:24
-
-
Save bnsheehy/e6970e2a35ff1dc2b79c87d747676c57 to your computer and use it in GitHub Desktop.
Python Open Local Window - Colab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import the libraries. | |
from google.colab import files | |
import io | |
import json | |
# Use files.upload to produce the "Choose Files" button below, then select your file. | |
uploaded = files.upload() | |
# Use io.BytesIO to decode the file, then json.load to open it. | |
file = io.BytesIO(uploaded['sample_credentials.json']) | |
credentials = json.load(file) | |
# Do something with the credentials. | |
print(credentials) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment