{"id":13416131,"url":"https://github.com/joke2k/faker","last_synced_at":"2026-03-13T16:02:33.836Z","repository":{"id":37444807,"uuid":"6662075","full_name":"joke2k/faker","owner":"joke2k","description":"Faker is a Python package that generates fake data for you.","archived":false,"fork":false,"pushed_at":"2026-03-12T21:15:48.000Z","size":11383,"stargazers_count":19271,"open_issues_count":17,"forks_count":2052,"subscribers_count":218,"default_branch":"master","last_synced_at":"2026-03-12T23:23:15.201Z","etag":null,"topics":["dataset","fake","fake-data","faker","faker-generator","python","test-data","test-data-generator","testing"],"latest_commit_sha":null,"homepage":"https://faker.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joke2k.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.rst","funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["joke2k"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2012-11-12T23:00:09.000Z","updated_at":"2026-03-12T22:03:11.000Z","dependencies_parsed_at":"2026-03-12T19:01:39.446Z","dependency_job_id":null,"html_url":"https://github.com/joke2k/faker","commit_stats":{"total_commits":3282,"total_committers":595,"mean_commits":5.515966386554622,"dds":0.5408287629494211,"last_synced_commit":"a21084461e888ae731a16bbf04dd7d0116d81a0a"},"previous_names":[],"tags_count":478,"template":false,"template_full_name":null,"purl":"pkg:github/joke2k/faker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joke2k%2Ffaker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joke2k%2Ffaker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joke2k%2Ffaker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joke2k%2Ffaker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joke2k","download_url":"https://codeload.github.com/joke2k/faker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joke2k%2Ffaker/sbom","scorecard":{"id":529498,"data":{"date":"2025-08-11","repo":{"name":"github.com/joke2k/faker","commit":"c7db7f583d4773f8f908d50791cf88c6a87143b5"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.3,"checks":[{"name":"Code-Review","score":2,"reason":"Found 7/30 approved changesets -- score normalized to 2","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":"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"Maintained","score":10,"reason":"30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":9,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: jobLevel 'contents' permission set to 'write': .github/workflows/gh-release.yml:15","Info: topLevel 'contents' permission set to 'read': .github/workflows/ci.yml:11","Info: topLevel 'contents' permission set to 'read': .github/workflows/gh-release.yml:10","Warn: no topLevel permission defined: .github/workflows/issues.yml:1"],"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:116: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:118: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:126: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:149: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:151: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:159: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:166: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:249: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:251: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:259: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:69: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:77: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:84: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:92: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:94: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:102: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:185: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:187: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:195: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:201: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:225: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:227: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:235: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/gh-release.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/gh-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/gh-release.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/gh-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/issues.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/joke2k/faker/issues.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:264","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:33","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:58","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:82","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:131","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:164","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:107","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:200","Info:   0 out of  30 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 third-party GitHubAction dependencies pinned","Info:   0 out of   8 pipCommand dependencies pinned"],"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":"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":"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":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2025-49 / GHSA-5rjg-fvgr-3xxf"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 7 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-20T05:22:11.811Z","repository_id":37444807,"created_at":"2025-08-20T05:22:11.811Z","updated_at":"2025-08-20T05:22:11.811Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30469866,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T11:00:43.441Z","status":"ssl_error","status_checked_at":"2026-03-13T11:00:23.173Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["dataset","fake","fake-data","faker","faker-generator","python","test-data","test-data-generator","testing"],"created_at":"2024-07-30T21:00:54.630Z","updated_at":"2026-03-13T16:02:33.795Z","avatar_url":"https://github.com/joke2k.png","language":"Python","readme":"*Faker* is a Python package that generates fake data for you. Whether\nyou need to bootstrap your database, create good-looking XML documents,\nfill-in your persistence to stress test it, or anonymize data taken from\na production service, Faker is for you.\n\nFaker is heavily inspired by `PHP Faker`_, `Perl Faker`_, and by `Ruby Faker`_.\n\n----\n\n::\n\n    _|_|_|_|          _|\n    _|        _|_|_|  _|  _|      _|_|    _|  _|_|\n    _|_|_|  _|    _|  _|_|      _|_|_|_|  _|_|\n    _|      _|    _|  _|  _|    _|        _|\n    _|        _|_|_|  _|    _|    _|_|_|  _|\n\n|pypi| |build| |coverage| |license|\n\n----\n\nCompatibility\n-------------\n\nStarting from version ``4.0.0``, ``Faker`` dropped support for Python 2 and from version ``5.0.0``\nonly supports Python 3.8 and above. If you still need Python 2 compatibility, please install version ``3.0.1`` in the\nmeantime, and please consider updating your codebase to support Python 3 so you can enjoy the\nlatest features ``Faker`` has to offer. Please see the `extended docs`_ for more details, especially\nif you are upgrading from version ``2.0.4`` and below as there might be breaking changes.\n\nThis package was also previously called ``fake-factory`` which was already deprecated by the end\nof 2016, and much has changed since then, so please ensure that your project and its dependencies\ndo not depend on the old package.\n\nBasic Usage\n-----------\n\nInstall with pip:\n\n.. code:: bash\n\n    pip install Faker\n\nUse ``faker.Faker()`` to create and initialize a faker\ngenerator, which can generate data by accessing properties named after\nthe type of data you want.\n\n.. code:: python\n\n    from faker import Faker\n    fake = Faker()\n\n    fake.name()\n    # 'Lucy Cechtelar'\n\n    fake.address()\n    # '426 Jordy Lodge\n    #  Cartwrightshire, SC 88120-6700'\n\n    fake.text()\n    # 'Sint velit eveniet. Rerum atque repellat voluptatem quia rerum. Numquam excepturi\n    #  beatae sint laudantium consequatur. Magni occaecati itaque sint et sit tempore. Nesciunt\n    #  amet quidem. Iusto deleniti cum autem ad quia aperiam.\n    #  A consectetur quos aliquam. In iste aliquid et aut similique suscipit. Consequatur qui\n    #  quaerat iste minus hic expedita. Consequuntur error magni et laboriosam. Aut aspernatur\n    #  voluptatem sit aliquam. Dolores voluptatum est.\n    #  Aut molestias et maxime. Fugit autem facilis quos vero. Eius quibusdam possimus est.\n    #  Ea quaerat et quisquam. Deleniti sunt quam. Adipisci consequatur id in occaecati.\n    #  Et sint et. Ut ducimus quod nemo ab voluptatum.'\n\nEach call to method ``fake.name()`` yields a different (random) result.\nThis is because faker forwards ``faker.Generator.method_name()`` calls\nto ``faker.Generator.format(method_name)``.\n\n.. code:: python\n\n    for _ in range(10):\n      print(fake.name())\n\n    # 'Adaline Reichel'\n    # 'Dr. Santa Prosacco DVM'\n    # 'Noemy Vandervort V'\n    # 'Lexi O'Conner'\n    # 'Gracie Weber'\n    # 'Roscoe Johns'\n    # 'Emmett Lebsack'\n    # 'Keegan Thiel'\n    # 'Wellington Koelpin II'\n    # 'Ms. Karley Kiehn V'\n\nPytest fixtures\n---------------\n\n``Faker`` also has its own ``pytest`` plugin which provides a ``faker`` fixture you can use in your\ntests. Please check out the `pytest fixture docs` to learn more.\n\nProviders\n---------\n\nEach of the generator properties (like ``name``, ``address``, and\n``lorem``) are called \"fake\". A faker generator has many of them,\npackaged in \"providers\".\n\n.. code:: python\n\n    from faker import Faker\n    from faker.providers import internet\n\n    fake = Faker()\n    fake.add_provider(internet)\n\n    print(fake.ipv4_private())\n\n\nCheck the `extended docs`_ for a list of `bundled providers`_ and a list of\n`community providers`_.\n\nLocalization\n------------\n\n``faker.Faker`` can take a locale as an argument, to return localized\ndata. If no localized provider is found, the factory falls back to the\ndefault LCID string for US english, ie: ``en_US``.\n\n.. code:: python\n\n    from faker import Faker\n    fake = Faker('it_IT')\n    for _ in range(10):\n        print(fake.name())\n\n    # 'Elda Palumbo'\n    # 'Pacifico Giordano'\n    # 'Sig. Avide Guerra'\n    # 'Yago Amato'\n    # 'Eustachio Messina'\n    # 'Dott. Violante Lombardo'\n    # 'Sig. Alighieri Monti'\n    # 'Costanzo Costa'\n    # 'Nazzareno Barbieri'\n    # 'Max Coppola'\n\n``faker.Faker`` also supports multiple locales. New in v3.0.0.\n\n.. code:: python\n\n    from faker import Faker\n    fake = Faker(['it_IT', 'en_US', 'ja_JP'])\n    for _ in range(10):\n        print(fake.name())\n\n    # 鈴木 陽一\n    # Leslie Moreno\n    # Emma Williams\n    # 渡辺 裕美子\n    # Marcantonio Galuppi\n    # Martha Davis\n    # Kristen Turner\n    # 中津川 春香\n    # Ashley Castillo\n    # 山田 桃子\n\nYou can check available Faker locales in the source code, under the\nproviders package. The localization of Faker is an ongoing process, for\nwhich we need your help. Please don't hesitate to create a localized\nprovider for your own locale and submit a Pull Request (PR).\n\nOptimizations\n-------------\nThe Faker constructor takes a performance-related argument called\n``use_weighting``. It specifies whether to attempt to have the frequency\nof values match real-world frequencies (e.g. the English name Gary would\nbe much more frequent than the name Lorimer). If ``use_weighting`` is ``False``,\nthen all items have an equal chance of being selected, and the selection\nprocess is much faster. The default is ``True``.\n\nCommand line usage\n------------------\n\nWhen installed, you can invoke faker from the command-line:\n\n.. code:: console\n\n    faker [-h] [--version] [-o output]\n          [-l {bg_BG,cs_CZ,...,zh_CN,zh_TW}]\n          [-r REPEAT] [-s SEP]\n          [-i package.containing.custom_provider]\n          [fake] [fake argument [fake argument ...]]\n\nWhere:\n\n-  ``faker``: is the script when installed in your environment, in\n   development you could use ``python -m faker`` instead\n\n-  ``-h``, ``--help``: shows a help message\n\n-  ``--version``: shows the program's version number\n\n-  ``-o FILENAME``: redirects the output to the specified filename\n\n-  ``-l {bg_BG,cs_CZ,...,zh_CN,zh_TW}``: allows use of a localized\n   provider\n\n-  ``-r REPEAT``: will generate a specified number of outputs\n\n-  ``-s SEP``: will generate the specified separator after each\n   generated output\n\n-  ``-i package.containing.custom_provider`` additional custom provider to use. Note this\n   is the import path of the package containing your Provider class, not the\n   custom Provider class itself. Can be repeated to add multiple providers.\n\n-  ``fake``: is the name of the fake to generate an output for, such as\n   ``name``, ``address``, or ``text``\n\n-  ``[fake argument ...]``: optional arguments to pass to the fake (e.g. the\n   profile fake takes an optional list of comma separated field names as the\n   first argument)\n\nExamples:\n\n.. code:: console\n\n    $ faker address\n    968 Bahringer Garden Apt. 722\n    Kristinaland, NJ 09890\n\n    $ faker -l de_DE address\n    Samira-Niemeier-Allee 56\n    94812 Biedenkopf\n\n    $ faker profile ssn,birthdate\n    {'ssn': '628-10-1085', 'birthdate': '2008-03-29'}\n\n    $ faker -r=3 -s=\";\" name\n    Willam Kertzmann;\n    Josiah Maggio;\n    Gayla Schmitt;\n\n    $ faker -i faker_credit_score credit_score_full\n    Experian/Fair Isaac Risk Model V2SM\n    Experian\n    801\n\nHow to create a Provider\n------------------------\n\n.. code:: python\n\n    from faker import Faker\n    fake = Faker()\n\n    # first, import a similar Provider or use the default one\n    from faker.providers import BaseProvider\n\n    # create new provider class\n    class MyProvider(BaseProvider):\n        def foo(self) -\u003e str:\n            return 'bar'\n\n    # then add new provider to faker instance\n    fake.add_provider(MyProvider)\n\n    # now you can use:\n    fake.foo()\n    # 'bar'\n\n\nHow to create a Dynamic Provider\n--------------------------------\n\nDynamic providers can read elements from an external source.\n\n.. code:: python\n\n    from faker import Faker\n    from faker.providers import DynamicProvider\n\n    medical_professions_provider = DynamicProvider(\n         provider_name=\"medical_profession\",\n         elements=[\"dr.\", \"doctor\", \"nurse\", \"surgeon\", \"clerk\"],\n    )\n\n    fake = Faker()\n\n    # then add new provider to faker instance\n    fake.add_provider(medical_professions_provider)\n\n    # now you can use:\n    fake.medical_profession()\n    # 'dr.'\n\nHow to customize the Lorem Provider\n-----------------------------------\n\nYou can provide your own sets of words if you don't want to use the\ndefault lorem ipsum one. The following example shows how to do it with a list of words picked from `cakeipsum \u003chttp://www.cupcakeipsum.com/\u003e`__ :\n\n.. code:: python\n\n    from faker import Faker\n    fake = Faker()\n\n    my_word_list = [\n    'danish','cheesecake','sugar',\n    'Lollipop','wafer','Gummies',\n    'sesame','Jelly','beans',\n    'pie','bar','Ice','oat' ]\n\n    fake.sentence()\n    # 'Expedita at beatae voluptatibus nulla omnis.'\n\n    fake.sentence(ext_word_list=my_word_list)\n    # 'Oat beans oat Lollipop bar cheesecake.'\n\n\nHow to use with Factory Boy\n---------------------------\n\n`Factory Boy` already ships with integration with ``Faker``. Simply use the\n``factory.Faker`` method of ``factory_boy``:\n\n.. code:: python\n\n    import factory\n    from myapp.models import Book\n\n    class BookFactory(factory.Factory):\n        class Meta:\n            model = Book\n\n        title = factory.Faker('sentence', nb_words=4)\n        author_name = factory.Faker('name')\n\nAccessing the `random` instance\n-------------------------------\n\nThe ``.random`` property on the generator returns the instance of\n``random.Random`` used to generate the values:\n\n.. code:: python\n\n    from faker import Faker\n    fake = Faker()\n    fake.random\n    fake.random.getstate()\n\nBy default all generators share the same instance of ``random.Random``, which\ncan be accessed with ``from faker.generator import random``. Using this may\nbe useful for plugins that want to affect all faker instances.\n\nUnique values\n-------------\n\nThrough use of the ``.unique`` property on the generator, you can guarantee\nthat any generated values are unique for this specific instance.\n\n.. code:: python\n\n   from faker import Faker\n   fake = Faker()\n   names = [fake.unique.first_name() for i in range(500)]\n   assert len(set(names)) == len(names)\n\nOn ``Faker`` instances with multiple locales, you can specify the locale to use\nfor the unique values by using the subscript notation:\n\n.. code:: python\n\n   from faker import Faker\n   fake = Faker(['en_US', 'fr_FR'])\n   names = [fake.unique[\"en_US\"].first_name() for i in range(500)]\n   assert len(set(names)) == len(names)\n\nCalling ``fake.unique.clear()`` clears the already seen values.\n\nNote, to avoid infinite loops, after a number of attempts to find a unique\nvalue, Faker will throw a ``UniquenessException``. Beware of the `birthday\nparadox \u003chttps://en.wikipedia.org/wiki/Birthday_problem\u003e`_, collisions\nare more likely than you'd think.\n\n\n.. code:: python\n\n   from faker import Faker\n\n   fake = Faker()\n   for i in range(3):\n        # Raises a UniquenessException\n        fake.unique.boolean()\n\nIn addition, only hashable arguments and return values can be used\nwith ``.unique``.\n\nSeeding the Generator\n---------------------\n\nWhen using Faker for unit testing, you will often want to generate the same\ndata set. For convenience, the generator also provides a ``seed()`` method,\nwhich seeds the shared random number generator. A Seed produces the same result\nwhen the same methods with the same version of faker are called.\n\n.. code:: python\n\n    from faker import Faker\n    fake = Faker()\n    Faker.seed(4321)\n\n    print(fake.name())\n    # 'Margaret Boehm'\n\nEach generator can also be switched to use its own instance of ``random.Random``,\nseparated from the shared one, by using the ``seed_instance()`` method, which acts\nthe same way. For example:\n\n.. code:: python\n\n    from faker import Faker\n    fake = Faker()\n    fake.seed_instance(4321)\n\n    print(fake.name())\n    # 'Margaret Boehm'\n\nPlease note that as we keep updating datasets, results are not guaranteed to be\nconsistent across patch versions. If you hardcode results in your test, make sure\nyou pinned the version of ``Faker`` down to the patch number.\n\nIf you are using ``pytest``, you can seed the ``faker`` fixture by defining a ``faker_seed``\nfixture. Please check out the `pytest fixture docs` to learn more.\n\nTests\n-----\n\nRun tests:\n\n.. code:: bash\n\n    $ tox\n\nWrite documentation for the providers of the default locale:\n\n.. code:: bash\n\n    $ python -m faker \u003e docs.txt\n\nWrite documentation for the providers of a specific locale:\n\n.. code:: bash\n\n    $ python -m faker --lang=de_DE \u003e docs_de.txt\n\n\nContribute\n----------\n\nPlease see `CONTRIBUTING`_.\n\nLicense\n-------\n\nFaker is released under the MIT License. See the bundled `LICENSE`_ file\nfor details.\n\nCredits\n-------\n\n-  `FZaninotto`_ / `PHP Faker`_\n-  `Distribute`_\n-  `Buildout`_\n-  `modern-package-template`_\n\n\n.. _FZaninotto: https://github.com/fzaninotto\n.. _PHP Faker: https://github.com/fzaninotto/Faker\n.. _Perl Faker: http://search.cpan.org/~jasonk/Data-Faker-0.07/\n.. _Ruby Faker: https://github.com/stympy/faker\n.. _Distribute: https://pypi.org/project/distribute/\n.. _Buildout: http://www.buildout.org/\n.. _modern-package-template: https://pypi.org/project/modern-package-template/\n.. _extended docs: https://faker.readthedocs.io/en/stable/\n.. _bundled providers: https://faker.readthedocs.io/en/stable/providers.html\n.. _community providers: https://faker.readthedocs.io/en/stable/communityproviders.html\n.. _pytest fixture docs: https://faker.readthedocs.io/en/master/pytest-fixtures.html\n.. _LICENSE: https://github.com/joke2k/faker/blob/master/LICENSE.txt\n.. _CONTRIBUTING: https://github.com/joke2k/faker/blob/master/CONTRIBUTING.rst\n.. _Factory Boy: https://github.com/FactoryBoy/factory_boy\n\n.. |pypi| image:: https://img.shields.io/pypi/v/Faker.svg?style=flat-square\u0026label=version\n    :target: https://pypi.org/project/Faker/\n    :alt: Latest version released on PyPI\n\n.. |coverage| image:: https://img.shields.io/coveralls/joke2k/faker/master.svg?style=flat-square\n    :target: https://coveralls.io/r/joke2k/faker?branch=master\n    :alt: Test coverage\n\n.. |build| image:: https://github.com/joke2k/faker/actions/workflows/ci.yml/badge.svg\n    :target: https://github.com/joke2k/faker/actions/workflows/ci.yml\n    :alt: Build status of the master branch\n\n.. |license| image:: https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square\n    :target: https://raw.githubusercontent.com/joke2k/faker/master/LICENSE.txt\n    :alt: Package license\n","funding_links":["https://github.com/sponsors/joke2k"],"categories":["Python Packages","Python","Testing","Languages","Python (144)","Data Processing","测试","数据读写与提取","Python 程序","[](#table-of-contents) Table of contents","Data Loading \u0026 Extraction","File Manipulation","Testing [🔝](#readme)","Awesome Python","Uncategorized","Fake Data","Synthetic Data Generation","🐍 Python"],"sub_categories":["Views","Data Pre-processing \u0026 Loading","网络服务_其他","[](#warc)Tools for working with WARC (WebARChive) files","HTTP Clients","Templates","Testing","Uncategorized","Useful Python Tools for Data Analysis"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoke2k%2Ffaker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoke2k%2Ffaker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoke2k%2Ffaker/lists"}