This is a simple command-line tool to generate random passwords using Python.
2 hour coding challenge to build a command line interface with python 💻⏳
To use this tool, make sure you have Poetry installed. Then run the following commands:
poetry shell && \
poetry update && \
poetry install && \
poetry run pytest && \
poetry run pylint **/*.py && \
poetry run flake8 && \
echo "🧪 CI Passed! ✅" || echo "🧪 CI Failed! ❌"
Generate a random password with a default length of 20 characters:
poetry run python -m pass_gen generate -len 20
You can also view the help message for more options:
poetry run python -m pass_gen --help
- Object-Oriented Design: The code follows an object-oriented approach, with classes like
RandomChar
andPasswordGenerator
encapsulating related functionality. - Modularity: The code is modular, with separate methods for generating different types of characters (uppercase, lowercase, numbers, and special characters).
- Flexibility: The
PasswordGenerator
class allows for customization of password length and minimum requirements for different character types. - Randomization: The generated passwords are randomized for increased security, with characters shuffled to create unique combinations.
Feel free to explore and modify the code according to your needs! Happy coding! 🚀