{"id":23780,"library":"gcloud-storage-emulator","title":"Google Cloud Storage Emulator","description":"A stub emulator for the Google Cloud Storage API, useful for testing and development without connecting to real GCS. Current version 0.5.0, supports Python 3.6+. Release cadence is sporadic.","status":"active","version":"0.5.0","language":"python","source_language":"en","source_url":"https://github.com/fsd/gsutil","tags":["gcs","emulator","testing","google-cloud-storage"],"install":[{"cmd":"pip install gcloud-storage-emulator","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"The emulator mimics the google-cloud-storage client; your code imports from google.cloud.storage.","package":"google-cloud-storage","optional":false}],"imports":[{"wrong":"from gcloud_storage_emulator import Emulator","symbol":"Emulator","correct":"import gcloud_storage_emulator"}],"quickstart":{"code":"from gcloud_storage_emulator import Emulator\nimport os\n\n# Start the emulator on port 9023\nemu = Emulator(port=9023)\nstarted = emu.start()\n\n# Point the client to the emulator\nos.environ['STORAGE_EMULATOR_HOST'] = 'http://localhost:9023'\n\n# Use google-cloud-storage client as usual\nfrom google.cloud import storage\nclient = storage.Client()\n\n# List buckets (will be empty)\nbuckets = list(client.list_buckets())\nprint(buckets)\n\nemu.stop()","lang":"python","description":"Start the emulator, set environment variable, and use google-cloud-storage client."},"warnings":[{"fix":"If you need persistence, consider using a different emulator (e.g., fake-gcs-server) or implement your own storage backend.","message":"The emulator does not persist data. All data is stored in memory and lost when the emulator stops.","severity":"gotcha","affected_versions":"all"},{"fix":"Set os.environ['STORAGE_EMULATOR_HOST'] = 'http://localhost:9023' before instantiating storage.Client().","message":"The environment variable STORAGE_EMULATOR_HOST must be set before creating the google-cloud-storage client. Otherwise, the client will connect to actual GCS.","severity":"gotcha","affected_versions":"all"},{"fix":"Use Emulator(port=9023) instead of Emulator(host='localhost:9023').","message":"The Emulator class constructor signature changed in 0.4.0: the 'port' parameter replaced the old 'host' parameter.","severity":"deprecated","affected_versions":"0.4.0+"}],"env_vars":null,"search_vec":"'0.5.0':26 '3.6':29 'api':13 'cadenc':31 'cloud':2,11,39 'connect':20 'current':24 'develop':18 'emul':4,7,35 'gcs':23,34 'googl':1,10,38 'google-cloud-storag':37 'python':28 'real':22 'releas':30 'sporad':33 'storag':3,12,40 'stub':6 'support':27 'test':16,36 'use':14 'version':25 'without':19","created_at":"2026-05-01T08:09:35.133801+00:00","updated_at":"2026-05-01T08:09:35.133801+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.5.0","cli_name":"gcloud-storage-emulator","cli_version":"usage: gcloud-storage-emulator [-h] {start,wipe,create_bucket} ...","type":"library","homepage":"https://gitlab.com/potato-oss/google-cloud/gcloud-storage-emulator","github":null,"docs":null,"changelog":null,"pypi":"https://pypi.org/project/gcloud-storage-emulator/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["gcp","testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}