{"id":18744948,"url":"https://github.com/rkstudio585/variable-checker","last_synced_at":"2025-06-20T15:10:57.605Z","repository":{"id":258142787,"uuid":"873401795","full_name":"rkstudio585/variable-checker","owner":"rkstudio585","description":"A Python tool for checking the validity of variable names, providing real-time feedback, correction suggestions, and an interactive, colorful interface using rich and pyfiglet.","archived":false,"fork":false,"pushed_at":"2024-11-10T18:23:44.000Z","size":117,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-28T20:14:03.775Z","etag":null,"topics":["project","pyfiglet","python","python-project","python-variable-checker","rich","rk","rk-studio-585","rkstudio","terminal-ui"],"latest_commit_sha":null,"homepage":"https://rkstudio.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rkstudio585.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-10-16T05:30:31.000Z","updated_at":"2024-11-10T18:23:48.000Z","dependencies_parsed_at":"2024-10-17T20:49:20.800Z","dependency_job_id":null,"html_url":"https://github.com/rkstudio585/variable-checker","commit_stats":null,"previous_names":["rkstudio585/variable-checker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rkstudio585%2Fvariable-checker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rkstudio585%2Fvariable-checker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rkstudio585%2Fvariable-checker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rkstudio585%2Fvariable-checker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rkstudio585","download_url":"https://codeload.github.com/rkstudio585/variable-checker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239627248,"owners_count":19670844,"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":["project","pyfiglet","python","python-project","python-variable-checker","rich","rk","rk-studio-585","rkstudio","terminal-ui"],"created_at":"2024-11-07T16:16:25.204Z","updated_at":"2025-02-19T08:51:57.877Z","avatar_url":"https://github.com/rkstudio585.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python Variable Checker Tool\n\n---\n\n![loGo](logo.webp)\n\n---\n\nA Python-based tool that checks if variable names are valid according to Python's naming rules. This tool provides:\n- **Real-time feedback** on whether a variable name is valid or invalid.\n- **Suggestions for correcting** invalid variable names.\n- **Multiple variable checks** at once for quick validation.\n- **Colorful interface** and an animated ASCII banner using `rich` and `pyfiglet` libraries for a user-friendly experience.\n\n## Features\n\n1. **Real-time Variable Validation**: The tool checks the validity of Python variable names based on standard rules.\n2. **Multiple Variable Validation**: You can validate multiple variable names in one go by separating them with commas.\n3. **Correction Suggestions**: If a variable is invalid, the tool suggests a corrected name (e.g., by adding an underscore if the variable starts with a number).\n4. **Animated ASCII Banner**: The tool greets the user with an animated ASCII banner using `pyfiglet`.\n5. **Rich Colorful UI**: The `rich` library adds vibrant colors and styling to the console output.\n\n## Python Variable Naming Rules\n\n- A variable name must start with a **letter (a-z, A-Z)** or an **underscore (_)**.\n- Variable names cannot start with a **number (0-9)**.\n- They can only contain **alphanumeric characters** (a-z, A-Z, 0-9) and underscores (_).\n- Variable names are **case-sensitive**.\n- **Reserved keywords** (like `if`, `else`, `while`) cannot be used as variable names.\n\n## Dependencies\n\nBefore running the script, make sure to install the following Python libraries:\n- [`rich`](https://github.com/Textualize/rich) for colorful text and user-friendly interface.\n- [`pyfiglet`](https://github.com/pwaller/pyfiglet) for rendering ASCII art banners.\n\nInstall the dependencies via pip:\n\n```bash\npip install rich pyfiglet\n```\nHow to Use\n\n1. Clone or Download the Project: You can clone this repository or download the Python script to your local machine.\n```bash\ngit clone https://github.com/rkstudio585/variable-checker.git\ncd variable-checker\n```\n\n2. Run the Script: To run the tool, simply execute the Python script in your terminal:\n```bash\npython variable_checker.py\n```\n\n3. Follow the Prompts: The tool will ask if you want to check multiple variable names at once. If you choose yes, you'll be asked to input the variable names, separated by commas.\n\nIf you enter only one variable, the tool will validate that variable and provide feedback. Here’s an example interaction:\n\nVariable Checker\n\nDo you want to check multiple variable names? (yes/no): yes\nEnter variable names separated by commas:\nmyVar, 123num, _valid_var, if\n\nCorrect: 'myVar' is a valid variable name!\nInvalid variable: '123num' does not follow variable naming rules.\nSuggested valid variable: '_123num'\nCorrect: '_valid_var' is a valid variable name!\nInvalid variable: 'if' is a Python keyword.\n\nThe tool will show whether each variable is valid or invalid and provide suggestions where possible.\n\n\n\nHow the Tool Works\n\n1. Animated Banner: The tool starts by printing an animated banner saying \"Variable Checker\" using pyfiglet.\n\n\n2. Input Validation: Users can choose to check a single variable or multiple variables at once. The tool then validates each variable based on Python’s rules:\n\nWhether the variable starts with a valid character.\n\nWhether it contains only valid characters.\n\nWhether the variable name is a Python keyword.\n\n\n\n3. Correction Suggestions: If a variable is invalid (e.g., starts with a number or contains invalid characters), the tool provides a suggestion for how to fix the name.\n\n\n4. Interactive Console: Using rich, the tool adds colors and formatted output for better readability and interaction.\n\n\n\nExample of Valid Variable Names\n\n- my_var\n\n- _myVariable\n\n- user123\n\n- age\n\n- _counter\n\nExample of Invalid Variable Names\n\n- 123abc → Invalid (cannot start with a number).\n\n- if → Invalid (Python keyword).\n\n- my-var → Invalid (hyphens are not allowed).\n\n\nFor invalid variables, the tool will suggest how to correct them, like _123abc instead of 123abc.\n\nContributing\n\nFeel free to contribute to this project by opening issues or submitting pull requests.\n\n\n---\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frkstudio585%2Fvariable-checker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frkstudio585%2Fvariable-checker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frkstudio585%2Fvariable-checker/lists"}