Compression
1. compress
1 | import zlib |
2. decompress
1 | import zlib |
3. Dynamodb Binary
1 | from boto3.dynamodb.types import Binary |
Json
json -> str
1 | json.dumps() |
str -> json
1 | json.loads() |
File
1 | file.open('sample.txt', 'w') |
Decorator
1 | def log(func): |