# 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:
1. ### Import the package ###
```
from generate_dummyf import *
```
2. ### 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/fm-pc-lt-848/Documents/")
```
3. ### 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/fm-pc-lt-848/Documents/")
```
4. ### 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/fm-pc-lt-848/Documents/")
```
5. ### 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/fm-pc-lt-848/Documents/")
```
6. ### Generate a TXT file ###
```
text_data = generate_txt(file_size=5000)
txt_data = generate_txt(file_size=50000, save_file_path="/home/fm-pc-lt-848/Documents/")
```
7. ### 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.
Raw data
{
"_id": null,
"home_page": "https://github.com/rubinakarkii/generate-dummyf",
"name": "generate-dummyf",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Rubina Karki",
"author_email": "rubinakarki369@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/63/55/dfa31d689b972d6c7a863c9202ffde60ab8bb2a0915db5298d17dacb32ea/generate-dummyf-1.1.1.tar.gz",
"platform": null,
"description": "# generate-dummyf Python Package #\n\n## Overview ##\n 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 \n simplifies the process of creating sample data files for testing, development, and other purposes.\n\n## Features ##\n 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 \n saving your output file. Generate a file with random data for a wide range of use cases.\n\n **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 \n equal to the user's file_size input\n\n## Installation ##\n You can install the package using pip:\n\n ```\n pip install generate-dummyf\n ```\n\n## Usage ##\n Here's a quick guide on how to use the **generate-dummyf** package to generate dummy files: \n\n1. ### Import the package ###\n ```\n from generate_dummyf import *\n ```\n\n2. ### Generate a JSON file ###\n ```\n json_data = generate_json(file_size=50000)\n json_data = generate_json(file_size=50000, column_description={\"Contact\" : \"int\", \"Name\" : \"str\", \"Status\": \"boolean\", \"Created_Time\": \"datetime\", \"Amount\": \"float\"})\n json_data = generate_json(file_size=50000, save_file_path=\"/home/fm-pc-lt-848/Documents/\")\n ```\n\n3. ### Generate an Excel file ###\n ```\n excel_data = generate_excel(file_size=50000)\n excel_data = generate_excel(file_size=50000, column_description={\"Contact\" : \"int\", \"Name\" : \"str\", \"Status\": \"boolean\", \"Created_Time\": \"datetime\", \"Amount\": \"float\"})\n excel_data = generate_excel(file_size=50000, save_file_path=\"/home/fm-pc-lt-848/Documents/\")\n ```\n\n4. ### Generate a CSV file \n ```\n csv_data = generate_csv(file_size=5000)\n csv_data = generate_csv(file_size=5000, column_description={\"Contact\" : \"int\", \"Name\" : \"str\", \"Status\": \"boolean\", \"Created_Time\": \"datetime\", \"Amount\": \"float\"})\n csv_data = generate_csv(file_size=50000, save_file_path=\"/home/fm-pc-lt-848/Documents/\")\n ```\n\n5. ### Generate a DOCX file ###\n ```\n docx_data = generate_word(file_size=50000)\n docx_data = generate_word(file_size=50000, font_size = 30, save_file_path=\"/home/fm-pc-lt-848/Documents/\")\n ```\n\n6. ### Generate a TXT file ###\n ```\n text_data = generate_txt(file_size=5000)\n txt_data = generate_txt(file_size=50000, save_file_path=\"/home/fm-pc-lt-848/Documents/\")\n ```\n\n7. ### View the generated files ###\n 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\n\n## Run the tests (For developers) ##\n ```\n python -m unittest tests/test_csv.py \n python -m unittest tests/test_excel.py \n python -m unittest tests/test_json.py \n python -m unittest tests/test_txt.py \n python -m unittest tests/test_word.py \n ```\n\n## Contributing ##\n Contributions to generate-dummyf are welcome! If you'd like to contribute to this project, please follow our contribution guidelines.\n\n## License ##\n This project is licensed under the MIT License - see the LICENSE file for details.\n\n## Support and Contact ##\n If you have any questions, issues, or feature requests, please feel free to open an issue.\n\n",
"bugtrack_url": null,
"license": "LICENSE",
"summary": "Generate different types (json, csv, excel, word, txt) of dummy files",
"version": "1.1.1",
"project_urls": {
"Homepage": "https://github.com/rubinakarkii/generate-dummyf"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "59da332593fc3ee7715b300dac3d3d911884a1529916b30a50b09952ed95f346",
"md5": "ad09732c5ccb2fac769aa10cb11ec1c6",
"sha256": "2b421891e9a2c9372a7db7ede0beff8020bbedec75fd3c1f7de417b298dae5e3"
},
"downloads": -1,
"filename": "generate_dummyf-1.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ad09732c5ccb2fac769aa10cb11ec1c6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 9215,
"upload_time": "2023-09-29T07:16:46",
"upload_time_iso_8601": "2023-09-29T07:16:46.075356Z",
"url": "https://files.pythonhosted.org/packages/59/da/332593fc3ee7715b300dac3d3d911884a1529916b30a50b09952ed95f346/generate_dummyf-1.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6355dfa31d689b972d6c7a863c9202ffde60ab8bb2a0915db5298d17dacb32ea",
"md5": "a16c3edf7961854b123eb345fbce8a1d",
"sha256": "60d78bc5d997c772f938cf7e3bb407c39961fd9c7bbd876d33a3cc2f225a98dd"
},
"downloads": -1,
"filename": "generate-dummyf-1.1.1.tar.gz",
"has_sig": false,
"md5_digest": "a16c3edf7961854b123eb345fbce8a1d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6467,
"upload_time": "2023-09-29T07:16:47",
"upload_time_iso_8601": "2023-09-29T07:16:47.586240Z",
"url": "https://files.pythonhosted.org/packages/63/55/dfa31d689b972d6c7a863c9202ffde60ab8bb2a0915db5298d17dacb32ea/generate-dummyf-1.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-29 07:16:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "rubinakarkii",
"github_project": "generate-dummyf",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "et-xmlfile",
"specs": [
[
"==",
"1.1.0"
]
]
},
{
"name": "lxml",
"specs": [
[
"==",
"4.9.3"
]
]
},
{
"name": "openpyxl",
"specs": [
[
"==",
"3.1.2"
]
]
},
{
"name": "pyspark",
"specs": [
[
"==",
"3.2.1"
]
]
},
{
"name": "python-docx",
"specs": [
[
"==",
"0.8.11"
]
]
}
],
"lcname": "generate-dummyf"
}