A package that provides ready-made objects of fake-data.
Project description
fakers
Library
- Author: Ashish Garg
- Year of release: 2024
- Description: This generates pre-built container objects filled with fabricated data.
Embrace the art of deception with our library—where faking it means making it!
How it helps?
If you need fake data that is structured in groups of fields, it typically requires additional time and effort. The fakers
library solves this problem & saves you that extra time by providing pre-structured grouped fake data.
Version History
Version | Release | Description |
---|---|---|
0.5.0 | Latest release - (01 Apr, 2024) | Module temperature device available (no support for spark and pandas df) |
0.1.0 to 0.4.0 | Initial releases | Fake objects related to two modules were released - Retail and Person . |
Module description
Temperature Device
This module provide you with the sensor device data particularly for temperature sensor. You can generate single or multiple sensors.
Example:
import fakers
sensor = fakers.TemperatureDevice.fake_device()
fake_sensors = fakers.TemperatureDevice.fake_devices_event_pack(4)
fake_sensor_event = fakers.TemperatureDevice.fake_device_event_pack()
fake_sensors_event = fakers.TemperatureDevice.fake_devices_event_pack(5)
Retail
This contains the fake objects related to the retail data and with relationship. For example:
import fakers
order = fakers.Retail.fake_order()
fifteen_orders = fakers.Retail.fake_orders(15)
user = fakers.Retail.fake_user()
ten_users = fakers.Retail.fake_users(10)
sale = fakers.Retail.fake_sale()
three_sales = fakers.Retail.fake_sales(3)
product = fakers.Retail.fake_product()
two_products = fakers.Retail.fake_products(2)
Person
This contains the fake objects related to the Person module. For example:
import fakers
fake_person = fakers.Person.fake_person()
fake_persons = fakers.Person.fake_persons(10)
fake_address = fakers.Person.fake_address()
fake_addresses = fakers.Person.fake_addresses(100)
Good to have features
💡 You can convert these objects directly to Pandas
and pyspark
dataframes. At present this is enabled
only for two modules: Person
& Retail
.
The functions you use for it are:
to_pandas
to_spark
Exmaple:
import fakers
import pandas as pd
fake_user = fakers.Retail.fake_user()
fake_user_df = fake_user.to_pandas()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file fakers-0.5.0-py3-none-any.whl
.
File metadata
- Download URL: fakers-0.5.0-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2ce0999c26de4cbaa6af4d3d888e902a6eb562de9da5ddef45a54f3a9e0456f |
|
MD5 | 0b38c5a3d64c81d621983880c92af16c |
|
BLAKE2b-256 | b0f3d8231a8dd5d43929a0e078cc4cb7f51f4ef875143e729d7b65e8767074bc |