generate-dummyf Python Package
Overview
The generate-dummyf Python package is a versatile tool for generating dummy files in different formats such as JSON, Excel, DOCX, TXT, and CSV. This package simplifies the process of creating sample data files for testing, development, and other purposes.
Features
Generate dummy data files in Json, Xlsx, Docx, Txt, and Csv formats. Easily specify the file size, the structure (columns and their data type) of files, path for saving your output file. Generate a file with random data for a wide range of use cases.
NOTE: file_size is a mandatory argument for each generate_* function whose value should be in bytes and the size of the output file may not be exactly equal to the user's file_size input
Installation
You can install the package using pip:
pip install generate-dummyf
Usage
Here's a quick guide on how to use the generate-dummyf package to generate dummy files:
-
Import the package
from generate_dummyf import * -
Generate a JSON file
json_data = generate_json(file_size=50000) json_data = generate_json(file_size=50000, column_description={"Contact" : "int", "Name" : "str", "Status": "boolean", "Created_Time": "datetime", "Amount": "float"}) json_data = generate_json(file_size=50000, save_file_path="/home/user-pc/Documents/") -
Generate an Excel file
excel_data = generate_excel(file_size=50000) excel_data = generate_excel(file_size=50000, column_description={"Contact" : "int", "Name" : "str", "Status": "boolean", "Created_Time": "datetime", "Amount": "float"}) excel_data = generate_excel(file_size=50000, save_file_path="/home/user-pc/Documents/") -
Generate a CSV file
csv_data = generate_csv(file_size=5000) csv_data = generate_csv(file_size=5000, column_description={"Contact" : "int", "Name" : "str", "Status": "boolean", "Created_Time": "datetime", "Amount": "float"}) csv_data = generate_csv(file_size=50000, save_file_path="/home/user-pc/Documents/") -
Generate a DOCX file
docx_data = generate_word(file_size=50000) docx_data = generate_word(file_size=50000, font_size = 30, save_file_path="/home/user-pc/Documents/") -
Generate a TXT file
text_data = generate_txt(file_size=5000) txt_data = generate_txt(file_size=50000, save_file_path="/home/user-pc/Documents/") -
View the generated files
By default, the generated files will be saved in the downloads directory; however, you can manually specify the path using the save_file_path argument
Run the tests (For developers)
python -m unittest tests/test_csv.py
python -m unittest tests/test_excel.py
python -m unittest tests/test_json.py
python -m unittest tests/test_txt.py
python -m unittest tests/test_word.py
Contributing
Contributions to generate-dummyf are welcome! If you'd like to contribute to this project, please follow our contribution guidelines.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support and Contact
If you have any questions, issues, or feature requests, please feel free to open an issue.
Metadata
Release files for generate-dummyf 1.1.4
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 | |
|---|---|---|---|---|
| generate-dummyf-1.1.4.tar.gz | 6.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| generate_dummyf-1.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.8 kB
Release files / generate-dummyf-1.1.4.tar.gz
| Download URL | generate-dummyf-1.1.4.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
50f44f43b839951ac39b1c3b21c58622baad99592c512ef40dd72918673c0d99
|
|
BLAKE2b-256 checksum How to use checksums |
575b237b023a7cdc4fbafacc1ecb8f437b64db6c1ca5541e27a066d797da5a3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / generate_dummyf-1.1.4-py3-none-any.whl
| Download URL | generate_dummyf-1.1.4-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
39c5f4ff9a7452eb1a6618bcd509d9aca97b9ba0aa7035adc20dce0653d2f804
|
|
BLAKE2b-256 checksum How to use checksums |
b6dc75d88197461bea84a4cd1a2fc837a448fd8f809ed8f64de7e3ee0b2c7647
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Security for generate-dummyf 1.1.4
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.