I'm trying to run a custom stript to upload static files to a bucket.
import os
import sys
sys.path.append("/tools/google_appengine")
from google.appengine.ext import vendor
from google.appengine.api import app_identity
vendor.add('../libraries')
import cloudstorage as gcs
STATIC_DIR = '../dashboard/dist'
def main():
bucket_path = ''.join('/' + app_identity.get_default_gcs_bucket_name())
What I've been trying so far: - initialize stubs manuaIlly
def initialize_service_apis():
from google.appengine.tools import dev_appserver
from google.appengine.tools.dev_appserver_main import ParseArguments
args, option_dict = ParseArguments(sys.argv) # Otherwise the option_dict isn't populated.
dev_appserver.SetupStubs('local', **option_dict)
But this gives me import error when importing dev_appserver
lib.
Is there any way to resolve the issue ? I need this script for an automatic deployment process.