Skip to content

Instantly share code, notes, and snippets.

@thobbs
Created December 15, 2011 00:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thobbs/1479283 to your computer and use it in GitHub Desktop.
Save thobbs/1479283 to your computer and use it in GitHub Desktop.
Pycassa DateTimeString Replacement
class DatetimeStingType(pycassa.types.CassandraType):
def __init__(self):
self.pack = lambda dtime: dtime.strftime('%Y-%m-%d')
self.unpack = lambda dtime_str: datetime.strptime('%Y-%m-%d')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment