datamaker-faker
Table of Contents
Installation
pip install datamaker-faker
Features
This package:
- Aims to be a replacement for the
fakerpackage 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
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))
See generated JSON data
[
{
"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"
}
]
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 license.
Metadata
Release files for datamaker-faker 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| datamaker_faker-0.0.1.tar.gz | 12.6 kB | Without provenance | Details for datamaker_faker-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| datamaker_faker-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for datamaker_faker-0.0.1-py3-none-any.whl |
Total release size: 25.2 kB
Release files / datamaker_faker-0.0.1.tar.gz
| Download URL | datamaker_faker-0.0.1.tar.gz |
|---|---|
| Size | 12.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1cb41471afa47694848dda77af3ba3abe3dedc7da96ca87f0e3f40a72f5d8297
|
|
BLAKE2b-256 checksum How to use checksums |
aa84bc2b78bb633f908010100b27116fe0e3f313fd67a247cc078bee43af1ad9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.19
|
Release files / datamaker_faker-0.0.1-py3-none-any.whl
| Download URL | datamaker_faker-0.0.1-py3-none-any.whl |
|---|---|
| Size | 12.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f4adfd4685db4afa7dae1c847939a80670320742d8a8e549979f3635b4579127
|
|
BLAKE2b-256 checksum How to use checksums |
6abe2dfff588c4ec54a2c9e4f84b85c68eaf0e71176c7ebd0b71e546dfc9bb79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.19
|
Security for datamaker-faker 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.