def newElem(type='post'):
  now = datetime.datetime.utcnow()
  now = now.replace(microsecond = 0)
  nowSpace = now.isoformat(' ')
  slug = util.onlyAlphaNum(now.isoformat('_'),'-')
  filepath = util.getContentFilepath(now, slug)
  while os.path.exists(filepath):
    nowSpace = "%s0"%(nowSpace)
    slug = "%s0"%(slug)
    filepath = util.getContentFilepath(now, slug)
  item = {
      'date': nowSpace,
      'name': slug,
      'title': nowSpace,
      'type': type,
      'status': 'hidden',
      'filepath': util.getContentFilepath(now, slug),
      'url': util.getURL(now, slug, type),
      'parent': '',
      'trash': ''
    }
  new_elem = ET.Element(type)
  updateElem(new_elem, item)
  return new_elem
Prepare the client to make requests.
dataset/ETHPy150Open DeanCutlet/filestack/views.py/newElem--crossover with--dataset/ETHPy150Open GoogleCloudPlatform/gcloud-python/gcloud/bigtable/client.py/Client.start