django python base 64 decode

import base64

# Step 1: Define the encoded string
encoded_string = "your_encoded_string_here"

# Step 2: Convert the encoded string to bytes
encoded_bytes = encoded_string.encode('utf-8')

# Step 3: Decode the bytes using base64
decoded_bytes = base64.b64decode(encoded_bytes)

# Step 4: Convert the decoded bytes to a string
decoded_string = decoded_bytes.decode('utf-8')