Create archives To create a tar.gz archive from a given folder we can use the following command: $ tar -zcvf <archive-name>.tar.gz <source-folder-name>
Minimal Python examples of how to convert string to bytes and vice versa. Let’s start Python REPL and experiment. $ python3 Python 3.7.0 (default, Jul 3 2018, 23:47:55) [Clang 9.0.0 (clang-900.0.39.2)] on darwin Type “help”, “copyright”, “credits” or “license” for more information.
JSON Web Token is an open standard that defines a way for securely transmitting JSON objects. The JSON object can be verified and trusted because it’s digitally signed. The JSON web tokens can be signed by using a secret with the HMAC algorithm or by public / private key pair using RSA.
From time to time I need to create a dictionary from the given list. The easiest and pythonic way to do it is to use enumerate() function and dictionary comprehensions.
Flask-Migrate is an extension that handles SQLAlchemy database migrations for Flask applications using Alembic. Database operations are made available through the Flask command-line interface or through the Flask-Script extension.
EC2 service endpoints Note that other regional endpoints are available for other services.
Every time I start a new Python project my first step is to create: