Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
oittaa committed Jan 20, 2022
1 parent d1eebc9 commit c84061a
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,8 @@ BUCKET = "test-bucket"
server = create_server(HOST, PORT, in_memory=True, default_bucket=BUCKET)
server.start()

# Avoid authentication when connecting to a storage emulator
# https://github.com/googleapis/python-storage/issues/324
os.environ["STORAGE_EMULATOR_HOST"] = f"http://{HOST}:{PORT}"
client = storage.Client.create_anonymous_client()
client.project = "test"
client = storage.Client()

bucket = client.bucket(BUCKET)
blob = bucket.blob("blob1")
Expand Down Expand Up @@ -140,11 +137,8 @@ HOST = "localhost"
PORT = 9023
BUCKET = "test-bucket"

# Avoid authentication when connecting to a storage emulator
# https://github.com/googleapis/python-storage/issues/324
os.environ["STORAGE_EMULATOR_HOST"] = f"http://{HOST}:{PORT}"
client = storage.Client.create_anonymous_client()
client.project = "test"
client = storage.Client()

try:
bucket = client.create_bucket(BUCKET)
Expand Down

0 comments on commit c84061a

Please sign in to comment.