> For the complete documentation index, see [llms.txt](https://epic-oreo.gitbook.io/cookie-utils/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://epic-oreo.gitbook.io/cookie-utils/usage/codes.md).

# Codes

To generate a hex code run

```python
from cookieutils import codes

print(codes.hex(10)) # the 10 is the length
```

you will get something that looks like

```
b87caf22be4d1f41e976
```

To generate a UUID, run

```python
from cookieutils import codes

print(codes.uuid())
```

you will get something that looks like

```
4bd9c444-6bd6-4eae-8be7-d87b1858e912
```

and if you want to make a custom code run

```python
import codes

print(codes.custom(
    5, # The length
    low=False,
    up=True,
    numbers=True,
    symbols=False,
    custom=None # you can pass in a custom list of strings to be used
))
```

**These are the DEFAULT SETTINGS** (other than the length) so you do not need to write out all of the  settings if you do not want to. this code will output something like

```
B4QZK
```
