Get user input for package name, description, and features.
()
| 154 | print(f"\nPackage file creation process completed.") |
| 155 | |
| 156 | def get_user_input() -> tuple: |
| 157 | """Get user input for package name, description, and features.""" |
| 158 | package_name = input("Enter the name for your Python package: ").strip() |
| 159 | while not package_name: |
| 160 | print("Package name cannot be empty. Please try again.") |
| 161 | package_name = input("Enter the name for your Python package: ").strip() |
| 162 | |
| 163 | package_description = input("Enter a brief description of your package: ").strip() |
| 164 | while not package_description: |
| 165 | print("Package description cannot be empty. Please try again.") |
| 166 | package_description = input("Enter a brief description of your package: ").strip() |
| 167 | |
| 168 | features = [] |
| 169 | print("Enter the features you want to include in your package.") |
| 170 | print("Type each feature and press Enter. When done, just press Enter on an empty line.") |
| 171 | while True: |
| 172 | feature = input("Enter a feature (or press Enter to finish): ").strip() |
| 173 | if not feature: |
| 174 | break |
| 175 | features.append(feature) |
| 176 | |
| 177 | return package_name, package_description, features |
| 178 | |
| 179 | def create_fallback_structure(package_name: str) -> Dict[str, str]: |
| 180 | """Create a fallback package structure if the model fails to generate one.""" |