This repository has been archived by the owner on Aug 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
halayli/cal
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Cassandra Abstraction Library. CAL abstracts Cassandra's confusing terminologies and allows you to use Python like syntax to access/manipulate Cassandra records. The library is not complete and doesn't support batch inserts/deletions yet. Usage: Assuming Users is a columnFamily of type Super in a Cassandara node. from cal import dbConnect keyspace = dbConnect()['MyDatabase'] users = keyspace['Users'] To insert a column/superColumn: users['joe']['personalInfo'].insert('emailAddress', '[email protected]') To fetch column/columns: users['joe'].get() or more granular users['joe']['personalInfo'].get() which is almost equivalent to: users['joe'].get(['personalInfo']) To delete a column: del users['joe'] or del users['joe']['personalInfo'] or del users['joe']['personalInfo']['emailAddress'] To count the number of columns: users['joe'].count() or users['joe']['personalInfo'].count() If Users is a columnFamily of type Standard, then you only nest one level deep: users['joe'].insert('emailAddress', '[email protected]')
About
Cassandra Abstraction Library for Python
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published