Skip to main content

A versatile mock data and entertainment content generator ported to Python.

Project description

fakedata (Python)

Python Version License: MIT

A high-performance, zero-dependency mock data generation engine ported to Python. Designed for testing, prototyping, and local development.

Whether you're building a backend prototype, seeding a database with thousands of records, or developing complex data-driven tests, fakedata provides a structured API for generating high-quality synthetic data across multiple domains.


Key Features

  • Zero External Dependencies: Uses only Python standard libraries (json, random, pathlib).
  • Modular Architecture: Separate namespaces for data, entertainment, anime, and biology.
  • Rich Datasets: Bundled with comprehensive JSON assets (Pokemon, Users, Industry-standard resumes).
  • Type Hinting: Built-in support for IDE intellisense.
  • Fast Execution: Optimized for generating large datasets with minimal overhead.

Installation

Install the package locally:

pip install .

Quick Start

import fakedata

# 1. Generate a comprehensive user profile
user_profile = fakedata.data.user()
print(f"Identity: {user_profile['fullName']} | City: {user_profile['address']['city']}")

# 2. Fetch specialized entertainment data
pokemon = fakedata.fun.pokemon()
random_joke = fakedata.fun.joke()

# 3. Filter specific anime content
naruto_quotes = fakedata.anime.quotes_by_show('Naruto')

API Documentation

Data Module (fakedata.data)

Focused on professional-grade mock data for PII and enterprise simulations.

Method Return Type Description
user() dict Generates a full profile (Personal Details, Address, Job, Bank Info).
users(count) list Returns a list of n unique user profiles.
creditcard() dict Generates realistic credit card data (Number, Expiry, CVV).
resume(count) list Mock professional resumes with skills, experience, and education.
get_password(len) dict Secure random password generator (default length: 8).
get_email() dict Randomly generated email address.
get_city() dict Global city name.

Fun (fakedata.fun)

Dynamic content for gaming and entertainment applications.

Method Return Type Description
pokemon() dict Returns a random Pokemon with full stats, types, and abilities.
pokemon_by_type(t) dict Filters Pokemon by specific type (e.g., 'Fire', 'Water').
joke() dict Randomly selected joke across various categories.
fact() dict General knowledge facts for engagement.
fortune() dict Philosophical or funny fortune cookies.

Anime Module (fakedata.anime)

Curated datasets for anime-themed projects.

Method Return Type Description
quote() dict Iconic quotes with character and show attribution.
quotes_by_show(s) dict All available quotes from a specific anime title.
fact() dict Specialized trivia regarding anime history and trivia.

Animals Module (fakedata.animals)

Simple biological data and interesting facts.

Method Return Type Description
random_animal() dict Returns a random animal profile.
dog_fact() dict Canine-specific trivia and biological facts.
cat_fact() dict Feline-specific trivia and statistics.

Testing

To run the local test suite:

python test_python.py

Development & Contributions

Contributions are welcome! If you'd like to add new datasets or modules, please follow these steps:

  1. Clone the repository.
  2. Implement your changes in fakedata/modules/.
  3. Add relevant tests in tests/.
  4. Submit a Pull Request.

License

Distributed under the MIT License. See LICENSE for more information.

Maintainer: abhay557

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fakedata_python-1.0.0.tar.gz (734.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fakedata_python-1.0.0-py3-none-any.whl (747.3 kB view details)

Uploaded Python 3

File details

Details for the file fakedata_python-1.0.0.tar.gz.

File metadata

  • Download URL: fakedata_python-1.0.0.tar.gz
  • Upload date:
  • Size: 734.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for fakedata_python-1.0.0.tar.gz
Algorithm Hash digest
SHA256 28eb3f6f8d66ff72cf4ab4c12ef9a80fc1de0f6a6e38cc804b713b13a55d1535
MD5 ece89de7d9acea1626313bbdccbbe616
BLAKE2b-256 a20a2b2525dc820a153836fbba99ee1344c1013b0b7cb7183121414739dfdf6b

See more details on using hashes here.

File details

Details for the file fakedata_python-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: fakedata_python-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 747.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for fakedata_python-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 759e4118dcd0d9e550bb7a937a38e58a92ba73a880d8104eba4ef2f0860c47bf
MD5 88e27e03b847d8950254ea531a2a61b6
BLAKE2b-256 25a1ba3f740dfb62c42e014309d1931ad77e8cacdf5cf1692def730ec455a245

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page