Sha256: a6ab591ef5f70e70f7553a55929130676678531e3693dc511fc860241a67274a

Contents?: true

Size: 526 Bytes

Versions: 1

Compression:

Stored size: 526 Bytes

Contents

#!/usr/bin/env python

import os
import pyrax

container_name = os.getenv('CONTAINER_NAME')
username = os.getenv('RAX_USERNAME')
api_key = os.getenv('RAX_API_KEY')
auth_endpoint = os.getenv('RAX_AUTH_URL')

pyrax.set_setting("identity_type", "rackspace")
# Create the identity object
pyrax._create_identity()
# Change its endpoint
pyrax.identity.auth_endpoint = auth_endpoint + '/v2.0/'

# Identity Connection - Authenticate
pyrax.set_credentials(username, api_key)

cf = pyrax.cloudfiles
cont = cf.create_container("my-site")

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
polytrix-0.0.1 sdks/pyrax/challenges/create_a_container.py