skillfed

gcp-storage-emulator

A stub emulator for the Google Cloud Storage API

gcp-storage-emulator v2026.7.19 155.4K downloads/30d#10,816 on PyPI202
Permissive license Active released

What it is and what it does

gcp-storage-emulator is a local stub server that mimics the Google Cloud Storage API, letting you develop and test code that uses GCS without hitting production infrastructure. It runs as either a standalone CLI service (listening on localhost:9023 by default) or as a Python API you can start programmatically from test code. The emulator can store data on disk or in memory, and integrates with the standard google-cloud-storage client by setting the STORAGE_EMULATOR_HOST environment variable.

The package is explicitly a work in progress supporting only a limited subset of the GCS API. It's useful for local iteration and automated testing where you need bucket and blob operations but don't require full API coverage. Data can be wiped via CLI command or HTTP endpoint, and buckets can be created automatically on startup.

Use it for:

  • Run integration tests for code using google-cloud-storage without external GCS credentials or network calls
  • Develop locally against GCS APIs without needing a GCP project or production account
  • Automate CI/CD pipelines with in-memory storage to avoid test data persistence and cleanup
  • Test bucket creation, blob upload/download, and listing operations in isolation

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a local emulator for Google Cloud Storage that intercepts API calls during development and testing, allowing you to work offline without connecting to production GCS.

Yes, if you are actively developing or testing code that uses google-cloud-storage and want to avoid production API calls. The low install friction, active maintenance, and zero known vulnerabilities make it safe to adopt. However, verify that the limited API subset it supports covers your use case—this is explicitly an Alpha tool, not a complete GCS replacement.

Install

gcp-storage-emulator on PyPI

pip

pip install gcp-storage-emulator

uv

uv add gcp-storage-emulator

poetry

poetry add gcp-storage-emulator

Installing gcp-storage-emulator

Before you install

Low friction install with a single runtime dependency (google-crc32c). The package is actively maintained with recent releases and no known vulnerabilities, though it is marked as Alpha status and explicitly documented as supporting only a limited subset of the GCS API.

License in practice

Permissive license treatment means you can use this freely in commercial and private projects without license compliance burden.

Quickstart

pip install gcp-storage-emulator

from gcp_storage_emulator.server import create_server
import os
from google.cloud import storage

server = create_server("localhost", 9023, in_memory=True, default_bucket="test-bucket")
server.start()
os.environ["STORAGE_EMULATOR_HOST"] = "http://localhost:9023"
client = storage.Client()
bucket = client.bucket("test-bucket")
blob = bucket.blob("test.txt")
blob.upload_from_string("data")
server.stop()

Requires google-cloud-storage client library to be installed separately to use the Python example; the emulator itself requires Python >=3.10

Verify before relying

  • Which specific GCS API operations are supported versus unsupported in this Alpha release
  • Performance characteristics when emulating large datasets or high request volumes
  • Compatibility guarantees with specific versions of google-cloud-storage client library

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 1 — google-crc32c
Maintenance actively maintained — 26 days since the last release
Last repo commit
First released
Downloads 155,388/month — #10,816 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: gcp_storage_emulator-2026.7.19-py3-none-any.whl

Keywords: Google Cloud Storage, Google App Engine, Google Cloud Platform, GCS, GAE, GCP

Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

google cloud storage local emulatorgcs mock server developmentoffline cloud storage testinggcp storage api stublocal gcs emulatorcloud storage testing tool
gcp-testinglocal-developmentmock-server

More Testing packages