#title Python Cassandra에서 데이터 가져오기 {{{ from pycassa import * pool = ConnectionPool('MyKeyspace', ['192.168.136.3:9160']) col_fam = ColumnFamily(pool, 'User') col_fam.get('nosql') col_fam.get('sql') d = dict(col_fam.get_range()) d['nosql'] d['nosql']['email'] }}} 실행 예제 {{{ >>> from pycassa import * >>> pool = ConnectionPool('MyKeyspace', ['192.168.136.3:9160']) >>> col_fam = ColumnFamily(pool, 'User') >>> col_fam.get('nosql') OrderedDict([(u'email', u'cassandra@gmail.com'), (u'fname', u'Cassandra')]) >>> col_fam.get('sql') OrderedDict([(u'email', u'oracle@gmail.com'), (u'fname', u'oracle')]) >>> d = dict(col_fam.get_range()) >>> d['nosql'] OrderedDict([(u'email', u'cassandra@gmail.com'), (u'fname', u'Cassandra')]) >>> d['nosql']['email'] u'cassandra@gmail.com' >>> }}}