Skip to content

Instantly share code, notes, and snippets.

@afraz-khan
Created January 31, 2025 14:46
Show Gist options
  • Save afraz-khan/c5c4b8d001cc872fc85a191982eff429 to your computer and use it in GitHub Desktop.
Save afraz-khan/c5c4b8d001cc872fc85a191982eff429 to your computer and use it in GitHub Desktop.
Generate a Secret Key with Python

We use the python secrets module to generate a random password/key.

python3 -c "import secrets; print(secrets.token_urlsafe(32))"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment