# fake2db: Generate Custom Test Databases with Fake Data

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/emirozer-fake2db
Generated for open source discovery and AI-assisted research.

fake2db is a powerful Python utility designed to create custom test databases populated with fake, yet valid, data. It supports a wide array of popular database systems, including SQLite, MySQL, PostgreSQL, MongoDB, Redis, and CouchDB. This tool is ideal for developers and testers needing quick, realistic data for testing and development environments.

GitHub: https://github.com/emirozer/fake2db
OSRepos URL: https://osrepos.com/repo/emirozer-fake2db

## Summary

fake2db is a powerful Python utility designed to create custom test databases populated with fake, yet valid, data. It supports a wide array of popular database systems, including SQLite, MySQL, PostgreSQL, MongoDB, Redis, and CouchDB. This tool is ideal for developers and testers needing quick, realistic data for testing and development environments.

## Topics

- Python
- Database
- Fake Data
- Testing
- Development
- Faker
- Data Generation

## Repository Information

Last analyzed by OSRepos: Sun Aug 02 2026 16:26:25 GMT+0100 (Western European Summer Time)
Detail views: 0
GitHub clicks: 0

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Introduction

`fake2db` is a powerful Python utility that simplifies the process of generating custom test databases populated with fake, yet valid, data. It's an invaluable tool for developers and testers who need to quickly set up realistic data environments without manual input. The tool supports a wide array of popular database systems, including SQLite, MySQL, PostgreSQL, MongoDB, Redis, and CouchDB, making it versatile for various project needs.

## Installation

Installation is straightforward using pip:

bash
pip install fake2db


For specific database support, additional packages are required:

*   **PostgreSQL:**
    bash
pip install psycopg2
    
    You might need `pg_config` on your system. For Mac, `brew install postgresql`. For CentOS, `sudo yum install postgresql-devel`.

*   **MongoDB:**
    bash
pip install pymongo
    

*   **Redis:**
    bash
pip install redis
    

*   **MySQL:**
    Requires MySQL Connector/Python, available at [http://dev.mysql.com/downloads/connector/python/](http://dev.mysql.com/downloads/connector/python/){:target="_blank"}.

*   **CouchDB:**
    bash
pip install couchdb
    

## Examples

`fake2db` offers flexible command-line arguments for generating data.

*   **Basic SQLite database with 200 rows:**
    bash
fake2db --rows 200 --db sqlite
    

*   **PostgreSQL database with 1500 rows and a custom name:**
    bash
fake2db --rows 1500 --db postgresql --name test_database_postgre
    

*   **PostgreSQL with host, password, and user:**
    bash
fake2db --db postgresql --rows 2500 --host container.local --password password --user docker
    

*   **Custom database generation with specific columns (e.g., name, date, country):**
    bash
fake2db.py --rows 250 --db mysql --username mysql --password somepassword --custom name date country
    

*   **Generating data with a specific locale and seed for reproducibility:**
    bash
fake2db --rows 200 --db sqlite --locale cs_CZ --seed 1337
    

## Why Use It

`fake2db` addresses a common challenge in software development: the need for realistic, yet disposable, data for testing, prototyping, and demonstration purposes. Instead of manually creating data or relying on sensitive production data, `fake2db` allows developers to quickly spin up databases with diverse, fake content. This ensures robust testing, accelerates development cycles, and maintains data privacy. Its support for multiple database types makes it a versatile asset in any developer's toolkit.

## Links

*   GitHub Repository: [https://github.com/emirozer/fake2db](https://github.com/emirozer/fake2db){:target="_blank"}