Storage Quickstart
This guide starts a local blobgw object gateway from a source checkout and reads and writes objects with the Python client. It then covers the persistent Docker Compose environment for development.
Prerequisites
- Go 1.26.8 or newer
- Python 3.10+ and uv for the client example
- A checkout of scitrera/memorylayer-storage
- Docker with Compose, for the persistent environment only
1. Start a disposable gateway
From the repository checkout:
cd blobgwgo run ./cmd/blobgw -addr 127.0.0.1:8080 -domain demo \ -backend local -data-dir /tmp/memorylayer-demo \ -index memory -staging memory -gc-interval 0This demo keeps the dedup/object index and upload staging in memory, stores chunk data under /tmp/memorylayer-demo, and turns off scheduled GC. The object index lives only in memory, so object refs are lost when you stop the process.
2. Read and write from Python
In another terminal, from the repository root:
uv venv. .venv/bin/activateuv pip install ./clients/pythonpython - <<'PYTHON'from blobgw_client import BlobGWClientclient = BlobGWClient("http://127.0.0.1:8080")client.put("demo/hello.txt", b"Hello, MemoryLayer!", "text/plain")assert client.get("demo/hello.txt") == b"Hello, MemoryLayer!"print(client.head("demo/hello.txt"))PYTHONYou can also call the HTTP API directly:
curl -X PUT -H 'Content-Type: text/plain' \ --data-binary 'hello' http://127.0.0.1:8080/v1/objects/demo/hello2.txtcurl http://127.0.0.1:8080/v1/objects/demo/hello2.txtcurl 'http://127.0.0.1:8080/v1/objects?prefix=demo/'See Object API for the full route list and the rest of the client.
3. Persistent local development
For a development environment that survives restarts, run this from the repository root:
make dev-up # PostgreSQL + blobgw with persistent Docker volumesmake dev-down # stop the services; stored data is retainedmake dev-up builds blobgw from docker/Dockerfile.blobgw and starts it with -index postgres against a bundled postgres:16-alpine container. Object data goes to a persistent local volume.
- Object API:
http://127.0.0.1:8080 - Health endpoints:
/healthzand/readyz - Published ports bind to localhost only. Set
BLOBGW_PORTorPOSTGRES_PORTto change them. - It uses development credentials and in-memory staging, and it turns off scheduled GC.
Installing the client from a tag
The Python client is published through Git tags, not PyPI. Install it into a virtual environment:
uv pip install "blobgw-client @ git+https://github.com/scitrera/memorylayer-storage.git@clients/python/v0.7.1#subdirectory=clients/python"Developing on the stack
make build # all eight Go modulesmake test # Go tests with the race detectormake test-python # Python client against a real gatewaymake check # formatting, vet, build, Go and Python tests, CI/version driftPostgreSQL-backed tests run when MLFS_TEST_DATABASE_URL and BLOBGW_TEST_DATABASE_URL point to a disposable database. The database from make dev-up works for this. Real FUSE and CSI mount tests also need Linux, /dev/fuse, and mount privileges.
Next steps
- Object API and capability edge
- S3-compatible gateway
- POSIX filesystem and CSI driver
- Operations: production backends, multi-tenancy, and GC