---
title: "Discussion on \"How to generate secrets in Python 3.6 and later\" | Hashnode"
description: "Discussion on \"How to generate secrets in Python 3.6 and later\". There are a lot of ways to generate random values. But some of them are not suitable for secret keys. There is a new module named secrets in version 3.6 and later. You can use the code below to generate cryptographically strong random values.\nimport ..."
url: "https://hashnode.com/posts/how-to-generate-secrets-in-python-3-6-and-later/6390d0c268aae0e23a91f49a"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to generate secrets in Python 3.6 and later](https://www.erdaltaskesen.com/how-to-generate-secrets-in-python-3-6-and-later?utm_source=hashnode&utm_medium=feed)

There are a lot of ways to generate random values. But some of them are not suitable for secret keys. There is a new module named secrets in version 3.6 and later. You can use the code below to generate cryptographically strong random values. import ...

Feb 23, 2018 · 1 min read · erdaltaskesen.com  
Updated Dec 10, 2022  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#python3](https://hashnode.com/tag/python3)
-   [#pseudo-random](https://hashnode.com/tag/pseudo-random)

## Written by

[Erdal TAŞKESEN](https://hashnode.com/@erdaltsksn)

@erdaltsksn · Earth

  
[View profile](https://hashnode.com/@erdaltsksn)

Self-Taught Software Engineer, Day Trader, Investor, Entrepreneur, and Teacher

Hey, y’all 🖖🏽 I am a passionate self-taught developer, open-source advocate, and tech enthusiast with a hands-on approach to problem-solving and an unending thirst for knowledge. Anything and everything classified as technology fascinate me.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
