A stub emulator for the Google Cloud Storage API
Local Emulator for Google Cloud Storage
Google doesn't (yet) ship an emulator for the Cloud Storage API like they do for Cloud Datastore.
This is a stub emulator so you can run your tests and do local development without having to connect to the production Storage APIs.
THIS IS A WORK IN PROGRESS AND ONLY SUPPORTS A LIMITED SUBSET OF API
Starting the emulator
Start the emulator with:
$ gcloud-storage-emulator start --port=9090
By default, data is stored under
$PWD/.cloudstorage. You can configure the folder using the env variables
If you wish to run the emulator in a testing environment or if you don't want to persist any data, you can use the
--no-store-on-disk parameter. For tests, you might want to consider starting up the server from your code (see the Python APIs)
You can wipe the data by running
$ gcloud-storage-emulator wipe
To start a server from your code you can do
from gcloud_storage_emulator.server import create_server server = create_server("localhost", 9023, in_memory=False) server.start() # ........ server.stop()
You can wipe the data (e.g. for text execution) by calling
This can also be achieved (e.g. during tests) by hitting the
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size gcloud_storage_emulator-0.0.0.dev10-py3-none-any.whl (12.9 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size gcloud-storage-emulator-0.0.0.dev10.tar.gz (10.1 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for gcloud_storage_emulator-0.0.0.dev10-py3-none-any.whl
Hashes for gcloud-storage-emulator-0.0.0.dev10.tar.gz