{"id":21853,"library":"random-password-generator","title":"random-password-generator","description":"A simple and customizable random password generator for Python. Version 2.2.0 uses the secrets module for cryptographically secure passwords, with the API component separated into a separate package. Released irregularly.","status":"active","version":"2.2.0","language":"python","source_language":"en","source_url":"https://github.com/suryasr007/random-password-generator","tags":["password","security","random","generator"],"install":[{"cmd":"pip install random-password-generator","lang":"bash","label":"Default install"}],"dependencies":[],"imports":[{"note":"The correct import path uses underscores.","symbol":"generate_password","correct":"from random_password_generator import generate_password"},{"note":"Class-based API, but function is recommended for most use cases.","symbol":"RandomPasswordGenerator","correct":"from random_password_generator import RandomPasswordGenerator"}],"quickstart":{"code":"from random_password_generator import generate_password\n\npassword = generate_password(length=16, numbers=True, uppercase=True, symbols=True)\nprint(password)","lang":"python","description":"Generate a 16-character password with numbers, uppercase, and symbols."},"warnings":[{"fix":"Upgrade to 2.1.0 or later with `pip install --upgrade random-password-generator`.","message":"In versions before 2.1.0, the library used the `random` module, which is not cryptographically secure. Always use version >=2.1.0 for secure generation.","severity":"gotcha","affected_versions":"<2.1.0"},{"fix":"If you need the web API, install `pip install rpg-web`. The library `random-password-generator` is now standalone.","message":"In v2.2.0, the API (web service) was separated into a new package. The library itself has zero dependencies now, but if you relied on the API endpoints, install `rpg-web` separately.","severity":"breaking","affected_versions":"==2.2.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use `from random_password_generator import generate_password` (all underscores).","cause":"The package name on PyPI has hyphens, but the import uses underscores. Users often try `import random-password-generator` which is invalid.","error":"ImportError: cannot import name 'generate_password' from 'random_password_generator'"},{"fix":"Run `pip install random-password-generator` and ensure you are using the correct virtual environment.","cause":"The package might not be installed, or Python environment issue.","error":"ModuleNotFoundError: No module named 'random_password_generator'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}