[python] Get Public URL for File - Google Cloud Storage - App Engine (Python)

Is there a python equivalent to the getPublicUrl PHP method?

$public_url = CloudStorageTools::getPublicUrl("gs://my_bucket/some_file.txt", true); 

I am storing some files using the Google Cloud Client Library for Python, and I'm trying to figure out a way of programatically getting the public URL of the files I am storing.

This question is related to python google-app-engine cloud google-cloud-storage

The answer is


You need to use get_serving_url from the Images API. As that page explains, you need to call create_gs_key() first to get the key to pass to the Images API.


Examples related to python

programming a servo thru a barometer Is there a way to view two blocks of code from the same file simultaneously in Sublime Text? python variable NameError Why my regexp for hyphenated words doesn't work? Comparing a variable with a string python not working when redirecting from bash script is it possible to add colors to python output? Get Public URL for File - Google Cloud Storage - App Engine (Python) Real time face detection OpenCV, Python xlrd.biffh.XLRDError: Excel xlsx file; not supported Could not load dynamic library 'cudart64_101.dll' on tensorflow CPU-only installation

Examples related to google-app-engine

Problems with installation of Google App Engine SDK for php in OS X Get Public URL for File - Google Cloud Storage - App Engine (Python) Visual Studio Code pylint: Unable to import 'protorpc' Get root password for Google Cloud Engine VM Spring Boot - Cannot determine embedded database driver class for database type NONE What is the difference between Google App Engine and Google Compute Engine? Cross-Origin Request Blocked Class JavaLaunchHelper is implemented in both. One of the two will be used. Which one is undefined ImportError: No module named apiclient.discovery java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer

Examples related to cloud

Get Public URL for File - Google Cloud Storage - App Engine (Python) What does ECU units, CPU core and memory mean when I launch a instance What is SaaS, PaaS and IaaS? With examples how to use free cloud database with android app? What is the difference between Cloud, Grid and Cluster? What is the recommended way to delete a large number of items from DynamoDB? Which programming language for cloud computing? What is the difference between Cloud Computing and Grid Computing?

Examples related to google-cloud-storage

Get Public URL for File - Google Cloud Storage - App Engine (Python) gcloud command not found - while installing Google Cloud SDK