MCPcopy Create free account
hub / github.com/GitsSaikat/PyGen / get_user_input

Function get_user_input

pygen/generate_package.py:156–177  ·  view source on GitHub ↗

Get user input for package name, description, and features.

()

Source from the content-addressed store, hash-verified

154 print(f"\nPackage file creation process completed.")
155
156def 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
179def create_fallback_structure(package_name: str) -> Dict[str, str]:
180 """Create a fallback package structure if the model fails to generate one."""

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected