{"id":25483857,"url":"https://github.com/mehmetkahya0/dummy-data-generator","last_synced_at":"2025-11-07T07:30:25.997Z","repository":{"id":251478483,"uuid":"837539389","full_name":"mehmetkahya0/dummy-data-generator","owner":"mehmetkahya0","description":"This Python script generates dummy data and writes it to a file. It can also read the data back from the file and display information about the size of the data and the file. It includes functionality to generate random strings, numbers, dates, and boolean values.","archived":false,"fork":false,"pushed_at":"2024-08-03T11:08:12.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-04T10:43:01.928Z","etag":null,"topics":["automation","dummy","dummy-data","dummy-data-generator","dummyjson","generator","json","python","python-script","python3","random","test","test-automation","testing-tools"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mehmetkahya0.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-03T09:22:54.000Z","updated_at":"2024-08-03T11:08:15.000Z","dependencies_parsed_at":"2024-08-03T10:55:45.695Z","dependency_job_id":null,"html_url":"https://github.com/mehmetkahya0/dummy-data-generator","commit_stats":null,"previous_names":["mehmetkahya0/dummy-data-generator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehmetkahya0%2Fdummy-data-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehmetkahya0%2Fdummy-data-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehmetkahya0%2Fdummy-data-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehmetkahya0%2Fdummy-data-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mehmetkahya0","download_url":"https://codeload.github.com/mehmetkahya0/dummy-data-generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239521116,"owners_count":19652822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","dummy","dummy-data","dummy-data-generator","dummyjson","generator","json","python","python-script","python3","random","test","test-automation","testing-tools"],"created_at":"2025-02-18T17:48:19.445Z","updated_at":"2025-11-07T07:30:25.733Z","avatar_url":"https://github.com/mehmetkahya0.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python Dummy Data Generator\n\nThis Python script generates dummy data and writes it to a file. It can also read the data back from the file and display information about the size of the data and the file. It includes functionality to generate random strings, numbers, dates, and boolean values.\n\n![Visitors](https://api.visitorbadge.io/api/visitors?path=https%3A%2F%2Fgithub.com%2Fmehmetkahya0%2Fdummy-data-generator\u0026label=VISITORS\u0026labelColor=%23d9e3f0\u0026countColor=%23263759)\n## Features\n\n- Generate random strings, numbers, dates, and boolean values\n- Write generated data to a JSON file\n- Read data from a JSON file\n- Calculate and display the size of the data and the file\n- Calculate and display the runtime of the script\n\n## Requirements\n\n- Python 3.x\n- colorama library\n\nYou can install the required library using pip:\n```sh\npip install colorama\n```\n\n## Usage\nCommand-line Arguments\n-f or --file: Specify the file name to write or read data (required)\n-r or --read: Read data from the specified file (optional)\n-n or --number: Specify the number of data entries to generate (default is 1)\n\n## Examples\nGenerate Dummy Data and Write to a File\n\n```sh\npython main.py -f data.json -n 10\n```\nThis command will generate 10 dummy data entries and write them to data.json.\n\n## Read Data from a File\n```sh\npython main.py -f data.json -r\n```\nThis command will read the data from data.json and display it along with the size of the data and the file.\n\n\n## Functions\n- random_string(string_length=10)\nGenerates a random string of lowercase letters with a default length of 10.\n\n- random_number()\nGenerates a random integer between 1 and 100.\n\n- random_date()\nGenerates a random date within one year from the current date.\n\n- random_boolean()\nGenerates a random boolean value (True or False).\n\n- generate_data()\nGenerates a dictionary with random values for name, age, date, and is_active.\n\n- write_data_to_file(data, file_name)\nWrites the provided data to the specified JSON file.\n\n- read_data_from_file(file_name)\nReads and returns the data from the specified JSON file.\n\n- generate_data_and_write_to_file(file_name, number)\nGenerates the specified number of data entries and writes them to the specified JSON file.\n\n- calculate_data_size(data)\nCalculates and returns the size of the provided data in bytes.\n\n- calculate_file_size(file_name)\nCalculates and returns the size of the specified file in bytes.\n\n- calculate_data_and_file_size(data, file_name)\nCalculates and displays the size of the provided data and the specified file.\n\n- calculate_runtime(start_time, end_time)\nCalculates and displays the runtime of the script.\n\n## License\nThis project is licensed under the MIT License. See the LICENSE file for details.\n@mehmetkahya0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehmetkahya0%2Fdummy-data-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmehmetkahya0%2Fdummy-data-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehmetkahya0%2Fdummy-data-generator/lists"}