byceps.cli.commands.generate_secret_key   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 22
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A generate_secret_key() 0 4 1
1
"""
2
byceps.cli.command.generate_secret_key
3
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4
5
Generate a secure secret key.
6
7
Suitable as a value for ``secret_key`` in a BYCEPS configuration file.
8
9
:Copyright: 2014-2025 Jochen Kupperschmidt
10
:License: Revised BSD (see `LICENSE` file for details)
11
"""
12
13
import secrets
14
15
import click
16
17
18
@click.command()
19
def generate_secret_key() -> None:
20
    """Generate a secure secret key."""
21
    click.echo(secrets.token_hex())
22