Python Prompts Free Prompt

Python Script to Generate Random Data for Testing

Create a Python script to generate fake data for database testing
☆ Save
Prompt
You are a Python developer. Write a script that generates realistic fake data for populating a database for testing purposes. Use the Faker library. The script should: 1) Generate data for common tables: users (name, email, address), products (name, price, description), orders (user_id, product_id, quantity, date), 2) Accept command-line arguments for number of records, 3) Output data as SQL insert statements, CSV, or JSON, 4) Ensure referential integrity (foreign keys), 5) Allow customizing field formats via config, 6) Include progress bars using tqdm. Provide documentation and examples.

How to use this prompt

1
Click Copy Prompt above to copy to your clipboard.
2
Open ChatGPT, Claude, Gemini, or any AI assistant and paste the prompt.
3
Replace any [PLACEHOLDER] values with your specific details.
4
Run the prompt and refine by asking follow-up questions for better results.