Categories
  Encyclosphere.org ENCYCLOREADER
  supported by EncyclosphereKSF

Pycassa

From HandWiki - Reading time: 1 min

pycassa is a client library for Apache Cassandra.[1]

It is a Python client library having following features:

  • Auto-failover for normal or thread-local connections
  • Batch interface
  • Connection pooling
  • Method to map an existing class to a Cassandra column family

Like Apache Cassandra, pycassa is open-source.[1]

Code example

The following code adds the user name with the corresponding password to the column families (pycassa.ColumnFamily) USER and USERNAME:[2]

username = "jericevans"
password = "**********"
useruuid = str(uuid())
columns = {"id": useruuid, "username": username, "password": password}
USER.insert(useruuid, columns)
USERNAME.insert(username, {"id": useruuid})

References

External links





Licensed under CC BY-SA 3.0 | Source: https://handwiki.org/wiki/Pycassa
10 views | Status: cached on September 14 2024 18:19:57
↧ Download this article as ZWI file
Encyclosphere.org EncycloReader is supported by the EncyclosphereKSF