Claude
💻 Coding & Dev
Intermediate
Function Fabricator
Create Python functions based on detailed specifications.
The Prompt
Your task is to create Python functions based on the provided natural language specifications. For each function requested: 1. Write clean, production-ready Python code 2. Include a clear docstring with parameters, return values, and a usage example 3. Add type hints for all parameters and return values 4. Handle edge cases and include appropriate error handling 5. Write at least 3 unit tests using pytest or unittest The functions should follow Python best practices: PEP 8 style, meaningful variable names, single responsibility principle, and no unnecessary complexity. If the specification is ambiguous, state your assumptions before writing the code. If there are multiple valid approaches, briefly explain which you chose and why.
How to use this prompt
1
Copy the prompt
Click "Copy Prompt" above to copy the full prompt text to your clipboard.
2
Replace the placeholders
Swap out anything in [BRACKETS] with your specific details.
3
Paste into Claude
Open your preferred AI assistant and paste the prompt to get started.