def put_many(self, key_objs, overwrite=True):
    '\n        Put objects to S3 in parallel.\n\n        Args:\n            key_objs:  (required) an iterator of (key, value) tuples. Value must\n                       be a string, bytes, or a unicode object.\n            overwrite: (optional) overwrites the key with obj, if it exists\n\n        Returns:\n            a list of (key, S3 URL) tuples corresponding to the files sent.\n        '

    def _store():
        for (key, obj) in key_objs:
            if is_stringish(obj):
                with NamedTemporaryFile(dir=self._tmpdir, delete=False, mode='wb', prefix='metaflow.s3.put_many.') as tmp:
                    tmp.write(to_bytes(obj))
                    tmp.close()
                    (yield (tmp.name, self._url(key), key))
            else:
                raise MetaflowS3InvalidObject(("Object corresponding to the key '%s' is not a string or a bytes object." % key))
    return self._put_many_files(_store(), overwrite)
Put objects to S3 in parallel.

Args:
    key_objs:  (required) an iterator of (key, value) tuples. Value must
               be a string, bytes, or a unicode object.
    overwrite: (optional) overwrites the key with obj, if it exists

Returns:
    a list of (key, S3 URL) tuples corresponding to the files sent.
def put_many(self, key_objs, overwrite=True):
    '\n        Put objects to S3 in parallel.\n\n        Args:\n            key_objs:  (required) an iterator of (key, value) tuples. Value must\n                       be a string, bytes, or a unicode object.\n            overwrite: (optional) overwrites the key with obj, if it exists\n\n        Returns:\n            a list of (key, S3 URL) tuples corresponding to the files sent.\n        '

    def _store():
        for (key, obj) in key_objs:
            if is_stringish(obj):
                with NamedTemporaryFile(dir=self._tmpdir, delete=False, mode='wb', prefix='metaflow.s3.put_many.') as tmp:
                    tmp.write(to_bytes(obj))
                    tmp.close()
                    (yield (tmp.name, self._url(key), key))
            else:
                raise MetaflowS3InvalidObject(("Object corresponding to the key '%s' is not a string or a bytes object." % key))
    return self._put_many_files(_store(), overwrite)