{"id":13394855,"url":"https://github.com/emirozer/fake2db","last_synced_at":"2025-10-14T09:47:03.170Z","repository":{"id":14252961,"uuid":"16960472","full_name":"emirozer/fake2db","owner":"emirozer","description":"create custom test databases that are populated with fake data","archived":false,"fork":false,"pushed_at":"2019-11-25T09:19:01.000Z","size":1046,"stargazers_count":2334,"open_issues_count":7,"forks_count":124,"subscribers_count":68,"default_branch":"master","last_synced_at":"2025-09-05T01:33:01.661Z","etag":null,"topics":["data","database","fake-content","faker","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emirozer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-18T19:14:28.000Z","updated_at":"2025-09-02T23:54:21.000Z","dependencies_parsed_at":"2022-07-15T15:17:35.469Z","dependency_job_id":null,"html_url":"https://github.com/emirozer/fake2db","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/emirozer/fake2db","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emirozer%2Ffake2db","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emirozer%2Ffake2db/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emirozer%2Ffake2db/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emirozer%2Ffake2db/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emirozer","download_url":"https://codeload.github.com/emirozer/fake2db/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emirozer%2Ffake2db/sbom","scorecard":{"id":375768,"data":{"date":"2025-08-11","repo":{"name":"github.com/emirozer/fake2db","commit":"5a7c0d55a47c903e8c1fead016fb0d2d01e88b3d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":4,"reason":"Found 6/15 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 22 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T14:12:49.789Z","repository_id":14252961,"created_at":"2025-08-18T14:12:49.789Z","updated_at":"2025-08-18T14:12:49.789Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018609,"owners_count":26086404,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["data","database","fake-content","faker","python"],"created_at":"2024-07-30T17:01:34.124Z","updated_at":"2025-10-14T09:47:03.129Z","avatar_url":"https://github.com/emirozer.png","language":"Python","readme":"![Screenshot](https://raw.github.com/emirozer/fake2db/master/docs/fake2db_logo_screenshot.png)\n===========\n***\n\n[![Latest Version](https://img.shields.io/pypi/v/fake2db.svg)](https://img.shields.io/pypi/v/fake2db.svg)\n[![Status](https://img.shields.io/pypi/status/fake2db.svg)](https://img.shields.io/pypi/status/fake2db.svg)\n\n\n\n## About\n\nGenerate fake but valid data filled databases for test purposes using most popular patterns(AFAIK).\nCurrent support is *sqlite, mysql, postgresql, mongodb, redis, couchdb*. \u003cbr\u003e\n\n## Installation\n\nThe installation through pypi retrieves 'fake-factory' as a main dependency.\n\n    pip install fake2db\n\n\n## Optional requirements\n\n\n###### PostgreSQL\n\n    pip install psycopg2\n\nFor `psycopg2` to install you need `pg_config` in your system.\n\nOn **Mac**, the solution is to install `postgresql`:\n   \n    brew install postgresql\n\nOn **CentOS**, the solution is to install `postgresql-devel`:\n\n    sudo yum install postgresql-devel\n\n\n#### Mongodb\n\n    pip install pymongo\n\n#### Redis\n\n    pip install redis\n\n#### MySQL\n\nmysql connector is needed for mysql db generation:\n  \n\u003ehttp://dev.mysql.com/downloads/connector/python/\n\n\n### CouchDB\n\n    pip install couchdb\n\n***\n\n## Usage\n\n*--rows* argument is pretty clear :) integer\n\n*--db* argument takes 6 possible options : sqlite, mysql, postgresql, mongodb, redis, couchdb\n\n*--name* argument is OPTIONAL. When it is absent fake2db will name db's randomly.\n\n*--host* argument is OPTIONAL. Hostname to use for database connection. Not used for sqlite.\n\n*--port* argument is OPTIONAL. Port to use for database connection. Not used for sqlite.\n\n*--username* argument is OPTIONAL. Username for the database user.\n\n*--password* argument is OPTIONAL. Password for database user. Only supported for mysql \u0026 postgresql.\n\n*--locale* argument is OPTIONAL. The localization of data to be generated ('en_US' as default).\n\n*--seed* argument is OPTIONAL. Integer for seeding random generator to produce the same data set between runs. Note: uuid4 values still generated randomly.\n\n\n`fake2db --rows 200 --db sqlite`\n\n`fake2db --rows 1500 --db postgresql --name test_database_postgre`\n\n`fake2db --db postgresql --rows 2500 --host container.local --password password --user docker`\n\n`fake2db --rows 200 --db sqlite --locale cs_CZ --seed 1337`\n\nIn addition to the databases supported in the db argument, you can also run fake2db with FoundationDB SQL Layer. Once SQL Layer is installed, simply use the postgresql generator and specify the SQL Layer port. For example:\n\n`fake2db --rows --db postgresql --port 15432`\n\n\n## Custom Database Generation\n\nIf you want to create a custom db/table, you have to provide **--custom** parameter followed by the column item you want. At the point in time, i mapped all the possible column items you can use here:\n\n\u003chttps://github.com/emirozer/fake2db/blob/master/fake2db/custom.py\u003e\n\nFeed any keys you want to the custom flag:\n\n`fake2db.py --rows 250 --db mysql --username mysql --password somepassword --custom name date country`\n\n`fake2db.py --rows 1500 --db mysql --password randompassword --custom currency_code credit_card_full credit_card_provider`\n\n`fake2db.py --rows 20 --db mongodb --custom name date country`\n\n## Sample output - SQLite\n\n![Screenshot](https://raw.github.com/emirozer/fake2db/master/docs/fake2db_example_sqlite.png)\n\n![Screenshot](https://raw.github.com/emirozer/fake2db/master/docs/mysql_fake2db.png)\n\n\n![Screenshot](https://raw.github.com/emirozer/fake2db/master/docs/pg_fake2db.png)\n\n\n","funding_links":[],"categories":["Testing","Python","资源列表","测试","Database Tools","File Manipulation","Testing [🔝](#readme)","Fake Data","Awesome Python"],"sub_categories":["测试","HTTP Clients","Testing"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femirozer%2Ffake2db","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femirozer%2Ffake2db","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femirozer%2Ffake2db/lists"}