def create_keyspace(name, strategy_class, replication_factor, durable_writes=True, **replication_values):
cluster = get_cluster()<EOL>if name not in cluster.metadata.keyspaces:<EOL><INDENT>replication_map = {<EOL>'<STR_LIT:class>': strategy_class,<EOL>'<STR_LIT>':replication_factor<EOL>}<EOL>replication_map.update(replication_values)<EOL>if strategy_class.lower() != '<STR_LIT>':<EOL><INDENT>replication_map.pop('<STR_LIT>', None)<EOL><DEDENT>query = """<STR_LIT>""".format(name, json.dumps(replication_map).replace('<STR_LIT:">', "<STR_LIT:'>"))<EOL>if strategy_class != '<STR_LIT>':<EOL><INDENT>query += "<STR_LIT>".format('<STR_LIT:true>' if durable_writes else '<STR_LIT:false>')<EOL><DEDENT>execute(query)<EOL><DEDENT>
creates a keyspace

:param name: name of keyspace to create
:param strategy_class: keyspace replication strategy class
:param replication_factor: keyspace replication factor
:param durable_writes: 1.2 only, write log is bypassed if set to False
:param **replication_values: 1.2 only, additional values to ad to the replication data map