A simple CLI tool to generate API Key
Project description
api-key-factory
Overview
api-key-factory
is a CLI tool to generate API keys and their corresponding SHA-256 hashes. The secret part of the key is an UUID (Universally Unique Identifier) version 4 (random).
Example of generated a API key:
mykey-8590efb6-0a68-4390-8537-99a54928c669
Usage: api-key-factory [OPTIONS] COMMAND [ARGS]...
A simple CLI tool to generate API keys and their corresponding SHA-256
hashes.
Options:
--version Show the version and exit.
--help Show this message and exit.
Commands:
generate Command to generate API keys and their corresponding SHA-256...
generate
Generate api keys and hashes in standart terminal output (stdout) or in 2 distinct files ([prefix_]keys.txt
, [prefix_]hashes.txt
) in a defined directory.
Usage: api-key-factory generate [OPTIONS]
Command to generate API keys and their corresponding SHA-256 hashes.
Raises: click.ClickException: Error when writing output file
Options:
-n, --num INTEGER RANGE Number of API keys to generate [x>=1]
--help Show this message and exit.
Example:
$ api-key-factory generate
e4feb87a-ff10-4cce-bbe2-3b9dcbeb019c 1e6d309d41b3a1b7a4855aba3382bdafcb7476db97416a7ecd9fcabe4292c5ca
Installation
With Python
environment
To use:
- Minimal Python version: 3.10
Installation with Python pip
:
python3 -m pip install api-key-factory
api-key-factory --help
Develpement
With Rye
To use:
- Minimal Python version: 3.10
Installation documentation: https://rye.astral.sh/guide/installation/
# Set environment
rye sync
# Lint
rye run lint
# Tests
rye run test
# Run
rye run api-key-factory --help
Authors
- FX Soubirou - Initial work - GitLab repositories
License
This program is free software: you can redistribute it and/or modify it under the terms of the MIT License (MIT). See the LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file api_key_factory-1.1.0.tar.gz
.
File metadata
- Download URL: api_key_factory-1.1.0.tar.gz
- Upload date:
- Size: 55.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e75e44cc75694766d89edaa759e66cacb77d99f5626a27d353f0c2801dcf8a88 |
|
MD5 | 37d8a9f85ab1f2aea8da3da7d4f76a1e |
|
BLAKE2b-256 | 1378847b2cede454b07262a09169fd2fa08b2d597db94127755feab9e0921014 |
File details
Details for the file api_key_factory-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: api_key_factory-1.1.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b83d6111d5a64ad9b91be8aeb7f6fce615e014ffad6e1d9d7e2588b2715d4951 |
|
MD5 | 151f06c39b248b2e4c0095938499badc |
|
BLAKE2b-256 | 9749f709bfe61aac6f2cc6321451054771f71b7eb6328dbfb7ca391eabbe35a8 |