Did I find the right examples for you? yes no

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)
Return ``(table_name, id)`` for ``object_id``::

>>> unpack_object_id(u'alkey:questions#1234')
(u'questions', 1234)
>>> unpack_object_id(u'alkey:questions#*')
(u'questions', None)

        def unpack_object_id(object_id):
    """Return ``(table_name, id)`` for ``object_id``::
      
          >>> unpack_object_id(u'alkey:questions#1234')
          (u'questions', 1234)
          >>> unpack_object_id(u'alkey:questions#*')
          (u'questions', None)
      
    """
    
    s = object_id.replace(u'alkey:', '', 1)
    parts = s.split('#')
    try:
        parts[1] = int(parts[1])
    except ValueError:
        parts[1] = None
    return tuple(parts)
        


src/a/l/alkey-0.6/src/alkey/handle.py   alkey(Download)
from .utils import get_table_id
from .utils import resiliently_call
from .utils import unpack_object_id
 
def handle_commit(session, get_redis=None, get_request=None, invalidate=None, call=None):