{"id":39230644,"url":"https://github.com/ibrahimraimi/ecom-seeder","last_synced_at":"2026-01-17T23:40:52.373Z","repository":{"id":321135471,"uuid":"1084626492","full_name":"ibrahimraimi/ecom-seeder","owner":"ibrahimraimi","description":"A Python script to generates a synthetic e-commerce database","archived":false,"fork":false,"pushed_at":"2025-10-28T00:02:29.000Z","size":8154,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-28T02:16:13.161Z","etag":null,"topics":["faker","generate","python","script"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ibrahimraimi.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-27T23:58:57.000Z","updated_at":"2025-10-28T00:02:02.000Z","dependencies_parsed_at":"2025-10-28T02:26:24.412Z","dependency_job_id":null,"html_url":"https://github.com/ibrahimraimi/ecom-seeder","commit_stats":null,"previous_names":["ibrahimraimi/ecom-seeder"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ibrahimraimi/ecom-seeder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibrahimraimi%2Fecom-seeder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibrahimraimi%2Fecom-seeder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibrahimraimi%2Fecom-seeder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibrahimraimi%2Fecom-seeder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ibrahimraimi","download_url":"https://codeload.github.com/ibrahimraimi/ecom-seeder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibrahimraimi%2Fecom-seeder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28522312,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T22:11:28.393Z","status":"ssl_error","status_checked_at":"2026-01-17T22:11:27.841Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["faker","generate","python","script"],"created_at":"2026-01-17T23:40:52.317Z","updated_at":"2026-01-17T23:40:52.366Z","avatar_url":"https://github.com/ibrahimraimi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ECommerce SQLite Database Seeder\n\nThis Python script generates a **synthetic e-commerce database** using `sqlite3`, `faker`, and `random`.\nIt creates realistic tables for **users**, **products**, and **orders**, then populates them with thousands of rows of fake data — perfect for **testing**, **analytics**, or **performance benchmarking**.\n\n---\n\n## Overview\n\nThe script automatically:\n\n1. Creates a local SQLite database file named `ecommerce.db`\n2. Builds three tables:\n\n   - **users** — customer profiles\n   - **products** — items for sale\n   - **orders** — purchases connecting users and products\n\n3. Populates the tables with large, randomly generated sample data.\n\n---\n\n## Database Schema\n\n### **users**\n\n| Column     | Type    | Description           |\n| ---------- | ------- | --------------------- |\n| id         | INTEGER | Primary key (auto)    |\n| name       | TEXT    | Full name             |\n| email      | TEXT    | Unique email address  |\n| address    | TEXT    | Physical address      |\n| created_at | TEXT    | Account creation date |\n\n### **products**\n\n| Column   | Type    | Description                              |\n| -------- | ------- | ---------------------------------------- |\n| id       | INTEGER | Primary key (auto)                       |\n| name     | TEXT    | Product name                             |\n| category | TEXT    | Category (e.g. Electronics, Books, etc.) |\n| price    | REAL    | Product price                            |\n\n### **orders**\n\n| Column     | Type    | Description               |\n| ---------- | ------- | ------------------------- |\n| id         | INTEGER | Primary key (auto)        |\n| user_id    | INTEGER | References `users(id)`    |\n| product_id | INTEGER | References `products(id)` |\n| quantity   | INTEGER | Number of items ordered   |\n| total      | REAL    | Total order amount        |\n| created_at | TEXT    | Order timestamp           |\n\n---\n\n## Setup \u0026 Usage\n\n### **1. Install dependencies**\n\n```bash\npip install faker\n```\n\n### **2. Run the script**\n\n```bash\npython seed_ecommerce_db.py\n```\n\nThis will create (or overwrite) an SQLite database file named **`ecommerce.db`** in the current directory.\n\n---\n\n## Default Data Volume\n\n| Table    | Rows Generated | Notes                                               |\n| -------- | -------------- | --------------------------------------------------- |\n| users    | 50,000         | Unique names, emails, and addresses                 |\n| products | 10,000         | Random categories and prices                        |\n| orders   | 200,000        | Randomized relationships between users and products |\n\n\u003e 💡 You can increase or decrease these numbers by editing the variables:\n\u003e\n\u003e ```python\n\u003e users_to_insert = 50000\n\u003e for _ in range(10000):  # products\n\u003e for _ in range(200000):  # orders\n\u003e ```\n\n---\n\n## Notes\n\n- Uses `faker` for realistic user and order data.\n- Ensures unique emails for all users.\n- Enforces foreign key relationships between users and orders.\n- Ideal for load testing APIs, analytics, or dashboard mockups.\n\n---\n\n## Cleanup\n\nTo reset the database:\n\n```bash\nrm ecommerce.db\n```\n\nThen rerun the script.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibrahimraimi%2Fecom-seeder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fibrahimraimi%2Fecom-seeder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibrahimraimi%2Fecom-seeder/lists"}