{"id":28100448,"url":"https://github.com/parisa-singh/password_generator","last_synced_at":"2025-07-21T08:32:44.342Z","repository":{"id":263854713,"uuid":"891600739","full_name":"parisa-singh/password_generator","owner":"parisa-singh","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-20T16:12:36.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-13T18:45:39.447Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/parisa-singh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-20T16:09:23.000Z","updated_at":"2024-11-20T16:12:40.000Z","dependencies_parsed_at":"2024-11-20T17:21:30.447Z","dependency_job_id":"55b0632b-d06b-4aa9-b7c1-17e4cea44d9c","html_url":"https://github.com/parisa-singh/password_generator","commit_stats":null,"previous_names":["parisa-singh/password_generator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/parisa-singh/password_generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parisa-singh%2Fpassword_generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parisa-singh%2Fpassword_generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parisa-singh%2Fpassword_generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parisa-singh%2Fpassword_generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parisa-singh","download_url":"https://codeload.github.com/parisa-singh/password_generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parisa-singh%2Fpassword_generator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266267289,"owners_count":23902334,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-13T18:34:54.749Z","updated_at":"2025-07-21T08:32:44.327Z","avatar_url":"https://github.com/parisa-singh.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Password Generator\n\n## Overview\n\nThis Python program generates a secure, random password with a customizable length. The password is designed to include a mix of uppercase letters, lowercase letters, digits, and special characters, ensuring strong password security.\n\n## Features\n\n1. **Customizable Length**  \n   - Users can specify the desired password length.\n   - Passwords can be as short or long as needed (minimum recommended length is 4 for variety).\n\n2. **Character Mix**  \n   - Passwords include:\n     - Uppercase letters (A-Z)\n     - Lowercase letters (a-z)\n     - Digits (0-9)\n     - Special characters (e.g., `@, #, $, %`)\n\n3. **Randomized Order**  \n   - Characters are shuffled to ensure unpredictability.\n\n4. **Secure Randomness**  \n   - Uses the `random.choices` method to select characters from respective groups.\n\n## Requirements\n\n- Python 3.x\n- Standard Python libraries (`random`, `math`, and `string`)\n\n## How It Works\n\n1. **Input Password Length**  \n   - The function `password_generator(length)` takes an integer (`length`) as input, specifying the desired password length.\n\n2. **Calculate Character Counts**  \n   - The password is divided into 4 groups:\n     - 25% uppercase letters\n     - 25% lowercase letters\n     - 25% digits\n     - Remaining characters as special characters.\n\n3. **Generate Characters**  \n   - Randomly selects characters from the respective groups.\n\n4. **Shuffle Characters**  \n   - Combines all selected characters and shuffles them to ensure a random order.\n\n5. **Output Password**  \n   - Returns the final password as a string.\n\n## Function Explanation\n\n### `password_generator(length)`\nGenerates a random password with the specified length.\n\n- **Parameters**  \n  - `length`: The total number of characters in the password.\n- **Returns**  \n  - A string containing the randomly generated password.\n- **Example Usage**  \n  ```python\n  print(password_generator(12))  # Output: random 12-character password\n  ```\n\n## Example Output\n\n### Input: `password_generator(10)`\n```\nOutput: Q1b@3dG!W#\n```\n\n### Input: `password_generator(16)`\n```\nOutput: R3*e$T7q#B8x@M2k\n```\n\n## Customization\n\n1. **Adjust Character Ratios**  \n   Modify the `num_upper`, `num_lower`, `num_digits`, and `num_special` calculations to alter the distribution of character types.  \n\n2. **Include/Exclude Specific Characters**  \n   Modify the `ascii_uppercase`, `ascii_lowercase`, `digits`, or `punctuation` groups in the `random.choices` calls.\n\n## Limitations\n\n- If the password length is less than 4, the generator may fail to include all character types.\n- Does not guarantee exact ratios for very short passwords.\n\n## Usage Recommendations\n\n- Use passwords with a length of at least 12 characters for stronger security.\n- Avoid reducing the proportion of special characters, as they enhance password strength.\n  \n## License\n\nThis project is open-source and available under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparisa-singh%2Fpassword_generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparisa-singh%2Fpassword_generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparisa-singh%2Fpassword_generator/lists"}