---
description: Generated and convert Private Key (hex)
---

# Private Key

generated random private key (hex) with blockthon without repeat , very fast.

example 1:

on this example code very optimized and fast generated hex for private key .

```python
from Blockthon.Wallet import getPrivateKey
# generated private key (hex) without repeat
privatekey = getPrivateKey()
```

example 2:

on this code all funcation's on _`Wallet`_ Class import can use on Big project

```python
from Blockthon import Wallet
# generated private key (hex) without repeat
privatekey = Wallet.getPrivateKey()
```

example 3:

```python
from Blockthon import Wallet
# generated private key (hex) without repeat
privatekey = Wallet.PVK()
```

example 4:

here all class blockthon imported can used and very long code .

```python
import Blockthon
# generated private key (hex) without repeat
privatekey = Blockthon.Wallet.getPrivateKey()
```

<figure><img src="https://3832678164-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2Vy5Azp7ucOasgn19dm%2Fuploads%2F7DumGdsop4cbVjTAYR6s%2FPrivateKey.png?alt=media&#x26;token=4e551af3-ef6d-45ad-a044-045ef0cbcf0b" alt="blockthon package for generated private key hex on python" width="563"><figcaption><p>Blockthon package PrivateKey Class</p></figcaption></figure>
