code: def datoms(self, index='aevt', e='', a='', v='', 
                     limit=0, offset=0, chunk=100, 
                     start='', end='', since='', as_of='', history='', **kwargs):
      
      assert index in ['aevt','eavt','avet','vaet'], "non-existant index"
      data = {'index':   index, 
              'a':       ':{0}'.format(a) if a else '',
              'v':       dump_edn_val(v) if v else '',
              'e':       int(e) if e else '', 
              'offset':  offset or 0,
              'start':   start,
              'end':     end,
              'limit':   limit,
              'history': 'true' if history else '',
              'as-of':   int(as_of) if as_of else '',
              'since':   int(since) if since else '',
              }
      data['limit'] = offset + chunk
      rs = True
      while rs and (data['offset'] < (limit or 1000000000)):
        ta = datetime.datetime.now()
        rs = self.rest('GET', self.uri_db + '-/datoms', data=data, parse=True)
        if not len(rs):
          rs = False
        tb = datetime.datetime.now() - ta
        print cl('<<< fetched %i datoms at offset %i in %sms' % (
          len(rs), data['offset'], tb.microseconds/1000.0), 'cyan')
        for r in rs: yield r
        data['offset'] += chunk
docs: Returns a lazy generator that will only fetch groups of datoms
          at the chunk size specified.
  
      http://docs.datomic.com/clojure/index.html#datomic.api/datoms