##References
##Use the latest ruby and setup gemset
from io import BytesIO | |
import base64 | |
import gzip | |
import json | |
def gzip_b64encode(data): | |
compressed = BytesIO() | |
with gzip.GzipFile(fileobj=compressed, mode='w') as f: | |
json_response = json.dumps(data) |
##References
##Use the latest ruby and setup gemset