Skip to content

Instantly share code, notes, and snippets.

@soiqualang
Forked from shaunmolloy/secret-key.py
Created May 14, 2024 07:34
Show Gist options
  • Save soiqualang/a4d9adbf97e2383f37b3d9cc5bcf1936 to your computer and use it in GitHub Desktop.
Save soiqualang/a4d9adbf97e2383f37b3d9cc5bcf1936 to your computer and use it in GitHub Desktop.
secret-key - Generate an app secret key
#!/usr/bin/env python
# secret-key
# Generate an app secret key
from base64 import b64encode
from os import urandom
random_bytes = urandom(64)
token = b64encode(random_bytes).decode()
print(token)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment