def hashkey(bucket, key): """create a key to use with a prepartitioned bucket: https://docs.aws.amazon.com/AmazonS3/latest/dev/request-rate-perf-considerations.html""" return hashlib.md5(os.path.join(bucket,key).encode('utf-8')).hexdigest()[0:6]