Skip to main content

key generator

Project description

GenerateKey

GenerateKey is a simple Python tool designed to generate secure secret keys and user passwords. It can be used both as a command-line utility and as a library within other Python projects.

Features

• Secret Key Generation: Create URL-safe base64-encoded secret keys of customizable byte length, suitable for cryptographic purposes such as signing tokens or encrypting data. • User Password Generation: Generate random user passwords of customizable length, including uppercase and lowercase letters, digits, and punctuation symbols.

Installation

You can install GenerateKey using pip:

pip install generatekey

Usage

Command-Line Interface

GenerateKey provides a CLI for generating keys and passwords directly from the terminal.

• Display Help To see the available commands and options, run:

generatekey -h

• Generate a Secret Key with Default Settings (64 bytes)

generatekey secretkey

• Generate a Secret Key with a Specific Number of Bytes

generatekey secretkey --nbyte 32

• Generate a User Password with Default Length (12 characters)

generatekey userpass

• Generate a User Password with a Specific Length

generatekey userpass --length 16

As a Python Module

You can also import GenerateKey into your Python projects:

from generatekey import get_secret_key, generate_user_password

# Generate a secret key of 32 bytes
secret_key = get_secret_key(nbytes=32)
print(f"Secret Key: {secret_key}")

# Generate a user password of length 16
password = generate_user_password(length=16)
print(f"User Password: {password}")

Requirements

• Python 3.10 or higher

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Commit your changes with descriptive commit messages.
  4. Push your branch to your forked repository.
  5. Create a pull request to the main repository.

Before submitting, ensure that:

• All tests pass. • Your code follows the project’s coding style. • You have updated the documentation if necessary.

License

This project is licensed under the MIT License. See the [LICENSE file for details.

Acknowledgments

• Thanks to the contributors of open-source libraries used in this project. • Inspired by the need for simple and secure key and password generation tools.

Support

If you encounter any issues or have questions, feel free to open an issue on the GitHub [repository.

Changelog

Version 0.1.0

• Initial release • Command-line interface for generating secret keys and user passwords • Functions available for import into other Python projects • Unit tests covering main functionalities

Feel free to modify this README to better suit your project’s specifics, such as updating URLs, adding badges, or including additional sections like a table of contents or FAQs.

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

generatekey-0.1.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

generatekey-0.1.1-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file generatekey-0.1.1.tar.gz.

File metadata

  • Download URL: generatekey-0.1.1.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.10.15 Linux/6.5.0-1025-azure

File hashes

Hashes for generatekey-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ef9ecf5fab32f660a356bbb1ea77031847c36d4122bfd9b4b9b05760a045767b
MD5 c79970c13847e6ddb80d67cea2c12568
BLAKE2b-256 deb214f2f8cac96fd4742d6bfb4ee4e92409a5b81cb69172e2a173d0ab396047

See more details on using hashes here.

File details

Details for the file generatekey-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: generatekey-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.10.15 Linux/6.5.0-1025-azure

File hashes

Hashes for generatekey-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aca5da1307d00915e0d598000a7e51b1e1985c8fa4416aed53aa7cc14a3b6003
MD5 16a2b6ee9bd5ceb531081ce365fa02bb
BLAKE2b-256 3bf5133130afcadd3282f266090c64de51c68f657e52574b68ff8af1c5c7956b

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