datamaker-faker


Namedatamaker-faker JSON
Version 0.0.1 PyPI version JSON
download
home_pageNone
SummaryA python lib for data generation
upload_time2024-04-06 07:47:21
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords data faker generate synthetic
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # datamaker-faker

[![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)

<!-- [![PyPI - Version](https://img.shields.io/pypi/v/datamaker-faker.svg)](https://pypi.org/project/datamaker-faker)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/datamaker-faker.svg)](https://pypi.org/project/datamaker-faker) -->

---

**Table of Contents**

- [Installation](#installation)
- [Features](#features)
- [Usage](#usage)
- [License](#license)

## Installation

```console
pip install datamaker-faker
```

## Features

This package:

- Aims to be a replacement for the `faker` package in Python but **NOT** a drop-in replacement.
- Fast: Generate data quickly at large scales.
- Reproducible: Set a seed to generate the same data over and over.
- Relational: Generate data that is related to each other.
- Extensible: Swop out the data for your own, or bring your own generators.

## Usage

```python
import json
from datamaker_faker import Faker

# define your data model
model = {
    "first": "first_name",
    "last": "last_name",
    "sex": "sex",
    "city": "city",
    "country": "country",
}

# create a new faker instance
faker = Faker(model, seed=9)

# generate some fake data
df = faker.generate(10)

# write the data to a csv file
df.to_csv("datafaker.csv")

# or leverage pandas to convert the data to json
data = df.to_dict("records")
print(json.dumps(data, indent=2))
```

<details>
<summary>See generated JSON data</summary>

```json
[
  {
    "first": "sophia",
    "last": "weber",
    "sex": "female",
    "city": "munich",
    "country": "germany"
  },
  {
    "first": "aiden",
    "last": "brown",
    "sex": "male",
    "city": "toronto",
    "country": "canada"
  },
  {
    "first": "sophia",
    "last": "weber",
    "sex": "female",
    "city": "munich",
    "country": "germany"
  },
  {
    "first": "aaradhya",
    "last": "singh",
    "sex": "female",
    "city": "delhi",
    "country": "india"
  },
  {
    "first": "liam",
    "last": "brown",
    "sex": "male",
    "city": "chicago",
    "country": "united states"
  },
  {
    "first": "daniel",
    "last": "kamau",
    "sex": "male",
    "city": "nairobi",
    "country": "kenya"
  },
  {
    "first": "alexander",
    "last": "smirnov",
    "sex": "male",
    "city": "nizhny novgorod",
    "country": "russia"
  },
  {
    "first": "johann",
    "last": "weber",
    "sex": "male",
    "city": "munich",
    "country": "germany"
  },
  {
    "first": "arjun",
    "last": "singh",
    "sex": "male",
    "city": "delhi",
    "country": "india"
  },
  {
    "first": "leonardo",
    "last": "ferrari",
    "sex": "male",
    "city": "naples",
    "country": "italy"
  }
]
```

</details>

## Disclaimer

This package is a work in progress and is not yet ready for production use.

## License

`datamaker-faker` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "datamaker-faker",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "data, faker, generate, synthetic",
    "author": null,
    "author_email": "Ratul Maharaj <56479869+RatulMaharaj@users.noreply.github.com>",
    "download_url": "https://files.pythonhosted.org/packages/aa/84/bc2b78bb633f908010100b27116fe0e3f313fd67a247cc078bee43af1ad9/datamaker_faker-0.0.1.tar.gz",
    "platform": null,
    "description": "# datamaker-faker\n\n[![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n\n<!-- [![PyPI - Version](https://img.shields.io/pypi/v/datamaker-faker.svg)](https://pypi.org/project/datamaker-faker)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/datamaker-faker.svg)](https://pypi.org/project/datamaker-faker) -->\n\n---\n\n**Table of Contents**\n\n- [Installation](#installation)\n- [Features](#features)\n- [Usage](#usage)\n- [License](#license)\n\n## Installation\n\n```console\npip install datamaker-faker\n```\n\n## Features\n\nThis package:\n\n- Aims to be a replacement for the `faker` package in Python but **NOT** a drop-in replacement.\n- Fast: Generate data quickly at large scales.\n- Reproducible: Set a seed to generate the same data over and over.\n- Relational: Generate data that is related to each other.\n- Extensible: Swop out the data for your own, or bring your own generators.\n\n## Usage\n\n```python\nimport json\nfrom datamaker_faker import Faker\n\n# define your data model\nmodel = {\n    \"first\": \"first_name\",\n    \"last\": \"last_name\",\n    \"sex\": \"sex\",\n    \"city\": \"city\",\n    \"country\": \"country\",\n}\n\n# create a new faker instance\nfaker = Faker(model, seed=9)\n\n# generate some fake data\ndf = faker.generate(10)\n\n# write the data to a csv file\ndf.to_csv(\"datafaker.csv\")\n\n# or leverage pandas to convert the data to json\ndata = df.to_dict(\"records\")\nprint(json.dumps(data, indent=2))\n```\n\n<details>\n<summary>See generated JSON data</summary>\n\n```json\n[\n  {\n    \"first\": \"sophia\",\n    \"last\": \"weber\",\n    \"sex\": \"female\",\n    \"city\": \"munich\",\n    \"country\": \"germany\"\n  },\n  {\n    \"first\": \"aiden\",\n    \"last\": \"brown\",\n    \"sex\": \"male\",\n    \"city\": \"toronto\",\n    \"country\": \"canada\"\n  },\n  {\n    \"first\": \"sophia\",\n    \"last\": \"weber\",\n    \"sex\": \"female\",\n    \"city\": \"munich\",\n    \"country\": \"germany\"\n  },\n  {\n    \"first\": \"aaradhya\",\n    \"last\": \"singh\",\n    \"sex\": \"female\",\n    \"city\": \"delhi\",\n    \"country\": \"india\"\n  },\n  {\n    \"first\": \"liam\",\n    \"last\": \"brown\",\n    \"sex\": \"male\",\n    \"city\": \"chicago\",\n    \"country\": \"united states\"\n  },\n  {\n    \"first\": \"daniel\",\n    \"last\": \"kamau\",\n    \"sex\": \"male\",\n    \"city\": \"nairobi\",\n    \"country\": \"kenya\"\n  },\n  {\n    \"first\": \"alexander\",\n    \"last\": \"smirnov\",\n    \"sex\": \"male\",\n    \"city\": \"nizhny novgorod\",\n    \"country\": \"russia\"\n  },\n  {\n    \"first\": \"johann\",\n    \"last\": \"weber\",\n    \"sex\": \"male\",\n    \"city\": \"munich\",\n    \"country\": \"germany\"\n  },\n  {\n    \"first\": \"arjun\",\n    \"last\": \"singh\",\n    \"sex\": \"male\",\n    \"city\": \"delhi\",\n    \"country\": \"india\"\n  },\n  {\n    \"first\": \"leonardo\",\n    \"last\": \"ferrari\",\n    \"sex\": \"male\",\n    \"city\": \"naples\",\n    \"country\": \"italy\"\n  }\n]\n```\n\n</details>\n\n## Disclaimer\n\nThis package is a work in progress and is not yet ready for production use.\n\n## License\n\n`datamaker-faker` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A python lib for data generation",
    "version": "0.0.1",
    "project_urls": {
        "Documentation": "https://github.com/automators-com/datamaker-faker#readme",
        "Issues": "https://github.com/automators-com/datamaker-faker/issues",
        "Source": "https://github.com/automators-com/datamaker-faker"
    },
    "split_keywords": [
        "data",
        " faker",
        " generate",
        " synthetic"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6abe2dfff588c4ec54a2c9e4f84b85c68eaf0e71176c7ebd0b71e546dfc9bb79",
                "md5": "5d016b987c63e8f6104895ab4f7372e5",
                "sha256": "f4adfd4685db4afa7dae1c847939a80670320742d8a8e549979f3635b4579127"
            },
            "downloads": -1,
            "filename": "datamaker_faker-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5d016b987c63e8f6104895ab4f7372e5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 12564,
            "upload_time": "2024-04-06T07:47:19",
            "upload_time_iso_8601": "2024-04-06T07:47:19.427920Z",
            "url": "https://files.pythonhosted.org/packages/6a/be/2dfff588c4ec54a2c9e4f84b85c68eaf0e71176c7ebd0b71e546dfc9bb79/datamaker_faker-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "aa84bc2b78bb633f908010100b27116fe0e3f313fd67a247cc078bee43af1ad9",
                "md5": "17eeffca752a8ccf2ba00ed9f5021a3c",
                "sha256": "1cb41471afa47694848dda77af3ba3abe3dedc7da96ca87f0e3f40a72f5d8297"
            },
            "downloads": -1,
            "filename": "datamaker_faker-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "17eeffca752a8ccf2ba00ed9f5021a3c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 12639,
            "upload_time": "2024-04-06T07:47:21",
            "upload_time_iso_8601": "2024-04-06T07:47:21.639104Z",
            "url": "https://files.pythonhosted.org/packages/aa/84/bc2b78bb633f908010100b27116fe0e3f313fd67a247cc078bee43af1ad9/datamaker_faker-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-06 07:47:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "automators-com",
    "github_project": "datamaker-faker#readme",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "datamaker-faker"
}
        
Elapsed time: 4.69486s