code: def namedb_get_namespace_ready( cur, namespace_id, include_history=True ):
      
  
      select_query = "SELECT * FROM namespaces WHERE namespace_id = ? AND op = ?;"
      namespace_rows = namedb_query_execute( cur, select_query, (namespace_id, NAMESPACE_READY))
  
      namespace_row = namespace_rows.fetchone()
      if namespace_row is None:
          # no such namespace 
          return None 
  
      namespace = {}
      namespace.update( namespace_row )
  
      if include_history:
          hist = namedb_get_history( cur, namespace_id )
          namespace['history'] = hist
  
      namespace = op_decanonicalize('NAMESPACE_READY', namespace)
      return namespace
docs: Get a ready namespace, and optionally its history.
      Only return a namespace if it is ready.