Skip to main content

A simple CLI tool to generate API Key

Project description

api-key-factory

Software License semantic-release: angular Pipeline Status

Built with Material for MkDocs Source code documentation

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

Get all files with yaml/yml extension from the input directory and generate the markdown files in the output 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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

api_key_factory-1.0.0.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

api_key_factory-1.0.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file api_key_factory-1.0.0.tar.gz.

File metadata

  • Download URL: api_key_factory-1.0.0.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for api_key_factory-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ba989a4ba505e064657909d8b41af13d43ca5e53a9ae6d56fafb06739432b287
MD5 0480aad6448b5069464b5ce10afeb5bd
BLAKE2b-256 459d29003f7e7151bcb288d6779b8d7bec2e7bf51c990934e54f2f30cfa19454

See more details on using hashes here.

File details

Details for the file api_key_factory-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for api_key_factory-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e81b2d9e0e02ca62752008f0ccc37b152e170ed167ed9a06ba1b4a3d3d504234
MD5 b17e079b2fd864fa2ff16c3485b45bda
BLAKE2b-256 5706beef372f66a55c317ea36eda3720108918da585f2f2d9b0b21b67b4bb651

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page