The steps involved are as follows:
- Clone the GitHub repository and navigate to the storagedrive directory: https://github.com/TrainingByPackt/BuildingGoogleCloudPlatformSolutions.
- Create virtualenv and install the dependencies to run the sample:
$ virtualenv env$ source env/bin/activate$ pip install -r requirements.txt
- The Python code will upload the file specified to Google Storage and make an entry into the Cloud Datastore. We have prepended a five-digit hash to the filename so that the files are not written in a contiguous manner. This will help Google Cloud Storage better manage the auto-balancing, upload connection speed, and distribution of files. The bucket name is hardcoded in the code, so modify as per your need. ...