parameters: (self)
docstring: Writes all objects matching
docstring_summary: Writes all objects matching
docstring_tokens: Writes all objects matching
function: def export(self):
          """ Writes all objects matching
          """
          try:
              self.collect_data()
  
              data = list(chain(*self.to_serialize))
  
              CurrentSerializer = serializers.get_serializer(self.format)
              serializer = CurrentSerializer()
  
              with open(self.target_file, "w") as out:
                  serializer.serialize(data, indent=self.indent, stream=out)
          except Exception as e:
              if self.show_traceback:
                  raise
              raise CommandError("Unable to serialize database: %s" % e)
function_tokens: def export ( self ) : try : self . collect_data ( ) data = list ( chain ( * self . to_serialize ) ) CurrentSerializer = serializers . get_serializer ( self . format ) serializer = CurrentSerializer ( ) with open ( self . target_file , "w" ) as out : serializer . serialize ( data , indent = self . indent , stream = out ) except Exception as e : if self . show_traceback : raise raise CommandError ( "Unable to serialize database: %s" % e )