←

Floci AZ local Azure emulator

Free and open-source alternative to localstack.


Floci-AZ

Docker compose setup

services:
  floci-az:
    image: floci/floci-az:latest
    ports:
      - "4577:4577"
    volumes:
      - ./data:/app/data
      - /var/run/docker.sock:/var/run/docker.sock  # required for Azure Functions
docker compose up -d

All services are immediately available at http://localhost:4577

Python example

Create an uv project

mkdir flocidemo && cd flocidemo
uv init

Install the Azure Blob Storage package

uv add azure-storage-blob

Write this code in main.py

from azure.storage.blob import BlobServiceClient

conn_str = (
    "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;"
    "AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMh0==;"
    "BlobEndpoint=http://localhost:4577/devstoreaccount1;"
)

client = BlobServiceClient.from_connection_string(conn_str)
client.create_container("dev-container")

blob = client.get_container_client("dev-container").get_blob_client("hello.txt")
blob.upload_blob(b"Hello from floci-az!")
print(blob.download_blob().readall())

Run script

uv run main.py

Result

b'Hello from floci-az!'