fake2db: Generate Custom Test Databases with Fake Data

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

fake2db: Generate Custom Test Databases with Fake Data

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.

Repository Information

Analyzed by OSRepos on August 2, 2026

Topics

Click on any tag to explore related repositories

Use at your own risk

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.

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:

pip install fake2db

For specific database support, additional packages are required:

  • PostgreSQL:
    pip install psycopg2
    

    You might need pg_config on your system. For Mac, brew install postgresql. For CentOS, sudo yum install postgresql-devel.

  • MongoDB:
    pip install pymongo
    
  • Redis:
    pip install redis
    
  • MySQL:

    Requires MySQL Connector/Python, available at http://dev.mysql.com/downloads/connector/python/.

  • CouchDB:
    pip install couchdb
    

Examples

fake2db offers flexible command-line arguments for generating data.

  • Basic SQLite database with 200 rows:
    fake2db --rows 200 --db sqlite
    
  • PostgreSQL database with 1500 rows and a custom name:
    fake2db --rows 1500 --db postgresql --name test_database_postgre
    
  • PostgreSQL with host, password, and user:
    fake2db --db postgresql --rows 2500 --host container.local --password password --user docker
    
  • Custom database generation with specific columns (e.g., name, date, country):
    fake2db.py --rows 250 --db mysql --username mysql --password somepassword --custom name date country
    
  • Generating data with a specific locale and seed for reproducibility:
    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

Related repositories

Similar repositories that may be relevant next.

Mimesis: A Powerful Python Library for Realistic Fake Data Generation

Mimesis: A Powerful Python Library for Realistic Fake Data Generation

August 2, 2026

Mimesis is a robust Python library designed for generating fake yet realistic data across various languages and locales. It simplifies the creation of diverse data types, from personal information to financial details. This makes it an invaluable tool for development, testing, and anonymization tasks.

Pythondata generationfake data
chardet: A Fast and Accurate Python Character Encoding Detector

chardet: A Fast and Accurate Python Character Encoding Detector

August 2, 2026

chardet is a powerful Python library designed for universal character encoding detection. The recently rewritten version 7 offers significant improvements in accuracy and speed, making it a robust solution for identifying text encodings. It provides features like language and MIME type detection, along with a flexible API for various use cases.

Pythoncharacter encodingencoding detection
Fuzzywuzzy: Python Library for Fuzzy String Matching

Fuzzywuzzy: Python Library for Fuzzy String Matching

August 1, 2026

Fuzzywuzzy is a popular Python library designed for fuzzy string matching, enabling efficient comparison and similarity scoring between text strings. It leverages Levenshtein distance to help with tasks like data cleaning and record linkage. While widely used, this project has been superseded by TheFuzz, which continues its development under a new name.

PythonFuzzy MatchingString Comparison
python-Levenshtein: Fast Levenshtein Distance and String Similarity in Python

python-Levenshtein: Fast Levenshtein Distance and String Similarity in Python

August 1, 2026

python-Levenshtein is a Python C extension module designed for high-performance computation of Levenshtein distance and various string similarity metrics. It provides functions for edit distance, string similarity, approximate median strings, and string sequence/set similarity, supporting both normal and Unicode strings. This library is a crucial tool for applications requiring efficient text comparison and analysis.

PythonLevenshteinString Similarity

Source repository

Open the original repository on GitHub.

View on GitHub
OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️