├── .bumpversion.cfg ├── .coveragerc ├── .dockerignore ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE.md ├── dependabot.yml └── workflows │ ├── ci.yml │ ├── gh-release.yml │ └── issues.yml ├── .gitignore ├── .isort.cfg ├── CHANGELOG.md ├── CITATION.cff ├── CONTRIBUTING.rst ├── LICENSE.txt ├── MANIFEST.in ├── Makefile ├── README.rst ├── RELEASE_PROCESS.rst ├── VERSION ├── build-alpine.sh ├── dev-requirements.txt ├── docs ├── Makefile ├── _templates │ └── breadcrumbs.html ├── coding_style.rst ├── communityproviders.rst ├── conf.py ├── fakerclass.rst ├── includes │ └── substitutions.rst ├── index.rst ├── locales │ └── .happygit ├── make.bat ├── providers │ └── .happygit ├── pytest-fixtures.rst └── writing-docs.rst ├── faker ├── __init__.py ├── __main__.py ├── cli.py ├── config.py ├── contrib │ ├── __init__.py │ └── pytest │ │ ├── __init__.py │ │ └── plugin.py ├── decode │ ├── __init__.py │ └── codes.py ├── documentor.py ├── exceptions.py ├── factory.py ├── generator.py ├── providers │ ├── __init__.py │ ├── address │ │ ├── __init__.py │ │ ├── az_AZ │ │ │ └── __init__.py │ │ ├── bn_BD │ │ │ └── __init__.py │ │ ├── cs_CZ │ │ │ └── __init__.py │ │ ├── da_DK │ │ │ └── __init__.py │ │ ├── de │ │ │ └── __init__.py │ │ ├── de_AT │ │ │ └── __init__.py │ │ ├── de_CH │ │ │ └── __init__.py │ │ ├── de_DE │ │ │ └── __init__.py │ │ ├── el_GR │ │ │ └── __init__.py │ │ ├── en │ │ │ └── __init__.py │ │ ├── en_AU │ │ │ └── __init__.py │ │ ├── en_BD │ │ │ └── __init__.py │ │ ├── en_CA │ │ │ └── __init__.py │ │ ├── en_GB │ │ │ └── __init__.py │ │ ├── en_IE │ │ │ └── __init__.py │ │ ├── en_IN │ │ │ └── __init__.py │ │ ├── en_MS │ │ │ └── __init__.py │ │ ├── en_NZ │ │ │ └── __init__.py │ │ ├── en_PH │ │ │ └── __init__.py │ │ ├── en_US │ │ │ └── __init__.py │ │ ├── es │ │ │ └── __init__.py │ │ ├── es_AR │ │ │ └── __init__.py │ │ ├── es_CL │ │ │ └── __init__.py │ │ ├── es_CO │ │ │ └── __init__.py │ │ ├── es_ES │ │ │ └── __init__.py │ │ ├── es_MX │ │ │ └── __init__.py │ │ ├── fa_IR │ │ │ └── __init__.py │ │ ├── fi_FI │ │ │ └── __init__.py │ │ ├── fil_PH │ │ │ └── __init__.py │ │ ├── fr_CA │ │ │ └── __init__.py │ │ ├── fr_CH │ │ │ └── __init__.py │ │ ├── fr_FR │ │ │ └── __init__.py │ │ ├── he_IL │ │ │ └── __init__.py │ │ ├── hi_IN │ │ │ └── __init__.py │ │ ├── hr_HR │ │ │ └── __init__.py │ │ ├── hu_HU │ │ │ └── __init__.py │ │ ├── hy_AM │ │ │ └── __init__.py │ │ ├── id_ID │ │ │ └── __init__.py │ │ ├── it_IT │ │ │ └── __init__.py │ │ ├── ja_JP │ │ │ └── __init__.py │ │ ├── ka_GE │ │ │ └── __init__.py │ │ ├── ko_KR │ │ │ └── __init__.py │ │ ├── ne_NP │ │ │ └── __init__.py │ │ ├── nl_BE │ │ │ └── __init__.py │ │ ├── nl_NL │ │ │ └── __init__.py │ │ ├── no_NO │ │ │ └── __init__.py │ │ ├── pl_PL │ │ │ └── __init__.py │ │ ├── pt_BR │ │ │ └── __init__.py │ │ ├── pt_PT │ │ │ └── __init__.py │ │ ├── ro_RO │ │ │ └── __init__.py │ │ ├── ru_RU │ │ │ └── __init__.py │ │ ├── sk_SK │ │ │ └── __init__.py │ │ ├── sl_SI │ │ │ └── __init__.py │ │ ├── sv_SE │ │ │ └── __init__.py │ │ ├── ta_IN │ │ │ └── __init__.py │ │ ├── th │ │ │ └── __init__.py │ │ ├── th_TH │ │ │ └── __init__.py │ │ ├── tl_PH │ │ │ └── __init__.py │ │ ├── uk_UA │ │ │ └── __init__.py │ │ ├── vi_VN │ │ │ └── __init__.py │ │ ├── zh_CN │ │ │ └── __init__.py │ │ ├── zh_TW │ │ │ └── __init__.py │ │ └── zu_ZA │ │ │ └── __init__.py │ ├── automotive │ │ ├── __init__.py │ │ ├── ar_BH │ │ │ └── __init__.py │ │ ├── ar_JO │ │ │ └── __init__.py │ │ ├── ar_PS │ │ │ └── __init__.py │ │ ├── ar_SA │ │ │ └── __init__.py │ │ ├── az_AZ │ │ │ └── __init__.py │ │ ├── bn_BD │ │ │ └── __init__.py │ │ ├── da_DK │ │ │ └── __init__.py │ │ ├── de_AT │ │ │ └── __init__.py │ │ ├── de_CH │ │ │ └── __init__.py │ │ ├── de_DE │ │ │ └── __init__.py │ │ ├── el_GR │ │ │ └── __init__.py │ │ ├── en_CA │ │ │ └── __init__.py │ │ ├── en_GB │ │ │ └── __init__.py │ │ ├── en_NZ │ │ │ └── __init__.py │ │ ├── en_PH │ │ │ └── __init__.py │ │ ├── en_US │ │ │ └── __init__.py │ │ ├── es_AR │ │ │ └── __init__.py │ │ ├── es_CL │ │ │ └── __init__.py │ │ ├── es_CO │ │ │ └── __init__.py │ │ ├── es_ES │ │ │ └── __init__.py │ │ ├── et_EE │ │ │ └── __init__.py │ │ ├── fi_FI │ │ │ └── __init__.py │ │ ├── fil_PH │ │ │ └── __init__.py │ │ ├── fr_FR │ │ │ └── __init__.py │ │ ├── he_IL │ │ │ └── __init__.py │ │ ├── hu_HU │ │ │ └── __init__.py │ │ ├── id_ID │ │ │ └── __init__.py │ │ ├── it_IT │ │ │ └── __init__.py │ │ ├── lt_LT │ │ │ └── __init__.py │ │ ├── nl_BE │ │ │ └── __init__.py │ │ ├── nl_NL │ │ │ └── __init__.py │ │ ├── no_NO │ │ │ └── __init__.py │ │ ├── pl_PL │ │ │ └── __init__.py │ │ ├── pt_BR │ │ │ └── __init__.py │ │ ├── pt_PT │ │ │ └── __init__.py │ │ ├── ro_RO │ │ │ └── __init__.py │ │ ├── ru_RU │ │ │ └── __init__.py │ │ ├── sk_SK │ │ │ └── __init__.py │ │ ├── sq_AL │ │ │ └── __init__.py │ │ ├── sv_SE │ │ │ └── __init__.py │ │ ├── th_TH │ │ │ └── __init__.py │ │ ├── tl_PH │ │ │ └── __init__.py │ │ ├── tr_TR │ │ │ └── __init__.py │ │ ├── uk_UA │ │ │ └── __init__.py │ │ ├── vi_VN │ │ │ └── __init__.py │ │ ├── zh_CN │ │ │ └── __init__.py │ │ └── zh_TW │ │ │ └── __init__.py │ ├── bank │ │ ├── __init__.py │ │ ├── az_AZ │ │ │ └── __init__.py │ │ ├── bn_BD │ │ │ └── __init__.py │ │ ├── cs_CZ │ │ │ └── __init__.py │ │ ├── da_DK │ │ │ └── __init__.py │ │ ├── de_AT │ │ │ └── __init__.py │ │ ├── de_CH │ │ │ └── __init__.py │ │ ├── de_DE │ │ │ └── __init__.py │ │ ├── el_GR │ │ │ └── __init__.py │ │ ├── en_GB │ │ │ └── __init__.py │ │ ├── en_IE │ │ │ └── __init__.py │ │ ├── en_IN │ │ │ └── __init__.py │ │ ├── en_PH │ │ │ └── __init__.py │ │ ├── es_AR │ │ │ └── __init__.py │ │ ├── es_ES │ │ │ └── __init__.py │ │ ├── es_MX │ │ │ └── __init__.py │ │ ├── fa_IR │ │ │ └── __init__.py │ │ ├── fi_FI │ │ │ └── __init__.py │ │ ├── fil_PH │ │ │ └── __init__.py │ │ ├── fr_CH │ │ │ └── __init__.py │ │ ├── fr_FR │ │ │ └── __init__.py │ │ ├── it_CH │ │ │ └── __init__.py │ │ ├── it_IT │ │ │ └── __init__.py │ │ ├── nl_BE │ │ │ └── __init__.py │ │ ├── nl_NL │ │ │ └── __init__.py │ │ ├── no_NO │ │ │ └── __init__.py │ │ ├── pl_PL │ │ │ └── __init__.py │ │ ├── pt_PT │ │ │ └── __init__.py │ │ ├── ro_RO │ │ │ └── __init__.py │ │ ├── ru_RU │ │ │ └── __init__.py │ │ ├── sk_SK │ │ │ └── __init__.py │ │ ├── th_TH │ │ │ └── __init__.py │ │ ├── tl_PH │ │ │ └── __init__.py │ │ ├── tr_TR │ │ │ └── __init__.py │ │ ├── uk_UA │ │ │ └── __init__.py │ │ └── zh_CN │ │ │ └── __init__.py │ ├── barcode │ │ ├── __init__.py │ │ ├── en_CA │ │ │ └── __init__.py │ │ ├── en_US │ │ │ └── __init__.py │ │ ├── es_ES │ │ │ └── __init__.py │ │ ├── fr_CA │ │ │ └── __init__.py │ │ └── ja_JP │ │ │ └── __init__.py │ ├── color │ │ ├── __init__.py │ │ ├── ar_PS │ │ │ └── __init__.py │ │ ├── az_AZ │ │ │ └── __init__.py │ │ ├── bg_BG │ │ │ └── __init__.py │ │ ├── bn_BD │ │ │ └── __init__.py │ │ ├── color.py │ │ ├── cs_CZ │ │ │ └── __init__.py │ │ ├── da_DK │ │ │ └── __init__.py │ │ ├── de │ │ │ └── __init__.py │ │ ├── de_AT │ │ │ └── __init__.py │ │ ├── de_CH │ │ │ └── __init__.py │ │ ├── de_DE │ │ │ └── __init__.py │ │ ├── el_GR │ │ │ └── __init__.py │ │ ├── en_US │ │ │ └── __init__.py │ │ ├── es │ │ │ └── __init__.py │ │ ├── es_CL │ │ │ └── __init__.py │ │ ├── es_ES │ │ │ └── __init__.py │ │ ├── fa_IR │ │ │ └── __init__.py │ │ ├── fr_FR │ │ │ └── __init__.py │ │ ├── he_IL │ │ │ └── __init__.py │ │ ├── hr_HR │ │ │ └── __init__.py │ │ ├── hu_HU │ │ │ └── __init__.py │ │ ├── hy_AM │ │ │ └── __init__.py │ │ ├── id_ID │ │ │ └── __init__.py │ │ ├── ka_GE │ │ │ └── __init__.py │ │ ├── pt_BR │ │ │ └── __init__.py │ │ ├── ru_RU │ │ │ └── __init__.py │ │ ├── sk_SK │ │ │ └── __init__.py │ │ ├── th_TH │ │ │ └── __init__.py │ │ ├── uk_UA │ │ │ └── __init__.py │ │ ├── uz_UZ │ │ │ └── __init__.py │ │ └── vi_VN │ │ │ └── __init__.py │ ├── company │ │ ├── __init__.py │ │ ├── az_AZ │ │ │ └── __init__.py │ │ ├── bg_BG │ │ │ └── __init__.py │ │ ├── bn_BD │ │ │ └── __init__.py │ │ ├── cs_CZ │ │ │ └── __init__.py │ │ ├── da_DK │ │ │ └── __init__.py │ │ ├── de_AT │ │ │ └── __init__.py │ │ ├── de_CH │ │ │ └── __init__.py │ │ ├── de_DE │ │ │ └── __init__.py │ │ ├── el_GR │ │ │ └── __init__.py │ │ ├── en_PH │ │ │ └── __init__.py │ │ ├── en_US │ │ │ └── __init__.py │ │ ├── es_CL │ │ │ └── __init__.py │ │ ├── es_ES │ │ │ └── __init__.py │ │ ├── es_MX │ │ │ └── __init__.py │ │ ├── fa_IR │ │ │ └── __init__.py │ │ ├── fi_FI │ │ │ └── __init__.py │ │ ├── fil_PH │ │ │ └── __init__.py │ │ ├── fr_CH │ │ │ └── __init__.py │ │ ├── fr_FR │ │ │ └── __init__.py │ │ ├── hr_HR │ │ │ └── __init__.py │ │ ├── hu_HU │ │ │ └── __init__.py │ │ ├── hy_AM │ │ │ └── __init__.py │ │ ├── id_ID │ │ │ └── __init__.py │ │ ├── it_IT │ │ │ └── __init__.py │ │ ├── ja_JP │ │ │ └── __init__.py │ │ ├── ko_KR │ │ │ └── __init__.py │ │ ├── nl_BE │ │ │ └── __init__.py │ │ ├── nl_NL │ │ │ └── __init__.py │ │ ├── no_NO │ │ │ └── __init__.py │ │ ├── pl_PL │ │ │ └── __init__.py │ │ ├── pt_BR │ │ │ └── __init__.py │ │ ├── pt_PT │ │ │ └── __init__.py │ │ ├── ro_RO │ │ │ └── __init__.py │ │ ├── ru_RU │ │ │ └── __init__.py │ │ ├── sk_SK │ │ │ └── __init__.py │ │ ├── sl_SI │ │ │ └── __init__.py │ │ ├── sv_SE │ │ │ └── __init__.py │ │ ├── th_TH │ │ │ └── __init__.py │ │ ├── tl_PH │ │ │ └── __init__.py │ │ ├── tr_TR │ │ │ └── __init__.py │ │ ├── vi_VN │ │ │ └── __init__.py │ │ ├── zh_CN │ │ │ └── __init__.py │ │ └── zh_TW │ │ │ └── __init__.py │ ├── credit_card │ │ ├── __init__.py │ │ ├── en_US │ │ │ └── __init__.py │ │ ├── fa_IR │ │ │ └── __init__.py │ │ ├── pt_PT │ │ │ └── __init__.py │ │ ├── ru_RU │ │ │ └── __init__.py │ │ └── uk_UA │ │ │ └── __init__.py │ ├── currency │ │ ├── __init__.py │ │ ├── az_AZ │ │ │ └── __init__.py │ │ ├── bn_BD │ │ │ └── __init__.py │ │ ├── cs_CZ │ │ │ └── __init__.py │ │ ├── da_DK │ │ │ └── __init__.py │ │ ├── de │ │ │ └── __init__.py │ │ ├── de_AT │ │ │ └── __init__.py │ │ ├── de_CH │ │ │ └── __init__.py │ │ ├── de_DE │ │ │ └── __init__.py │ │ ├── el_GR │ │ │ └── __init__.py │ │ ├── en_AU │ │ │ └── __init__.py │ │ ├── en_CA │ │ │ └── __init__.py │ │ ├── en_US │ │ │ └── __init__.py │ │ ├── es │ │ │ └── __init__.py │ │ ├── es_AR │ │ │ └── __init__.py │ │ ├── es_CL │ │ │ └── __init__.py │ │ ├── es_ES │ │ │ └── __init__.py │ │ ├── fa_IR │ │ │ └── __init__.py │ │ ├── fr_CA │ │ │ └── __init__.py │ │ ├── fr_FR │ │ │ └── __init__.py │ │ ├── it_IT │ │ │ └── __init__.py │ │ ├── ng_NG │ │ │ └── __init__.py │ │ ├── nl_NL │ │ │ └── __init__.py │ │ ├── pl_PL │ │ │ └── __init__.py │ │ ├── pt_BR │ │ │ └── __init__.py │ │ ├── ro_RO │ │ │ └── __init__.py │ │ ├── ru_RU │ │ │ └── __init__.py │ │ ├── sk_SK │ │ │ └── __init__.py │ │ ├── sv_SE │ │ │ └── __init__.py │ │ ├── th_TH │ │ │ └── __init__.py │ │ ├── tr_TR │ │ │ └── __init__.py │ │ ├── uk_UA │ │ │ └── __init__.py │ │ ├── uz_UZ │ │ │ └── __init__.py │ │ └── vi_VN │ │ │ └── __init__.py │ ├── date_time │ │ ├── __init__.py │ │ ├── ar_AA │ │ │ └── __init__.py │ │ ├── ar_EG │ │ │ └── __init__.py │ │ ├── az_AZ │ │ │ └── __init__.py │ │ ├── bn_BD │ │ │ └── __init__.py │ │ ├── cs_CZ │ │ │ └── __init__.py │ │ ├── da_DK │ │ │ └── __init__.py │ │ ├── de_AT │ │ │ └── __init__.py │ │ ├── de_DE │ │ │ └── __init__.py │ │ ├── el_GR │ │ │ └── __init__.py │ │ ├── en_PH │ │ │ └── __init__.py │ │ ├── en_US │ │ │ └── __init__.py │ │ ├── es │ │ │ └── __init__.py │ │ ├── es_AR │ │ │ └── __init__.py │ │ ├── es_CL │ │ │ └── __init__.py │ │ ├── es_ES │ │ │ └── __init__.py │ │ ├── fil_PH │ │ │ └── __init__.py │ │ ├── fr_CA │ │ │ └── __init__.py │ │ ├── fr_FR │ │ │ └── __init__.py │ │ ├── gu_IN │ │ │ └── __init__.py │ │ ├── hi_IN │ │ │ └── __init__.py │ │ ├── hr_HR │ │ │ └── __init__.py │ │ ├── hu_HU │ │ │ └── __init__.py │ │ ├── hy_AM │ │ │ └── __init__.py │ │ ├── id_ID │ │ │ └── __init__.py │ │ ├── it_IT │ │ │ └── __init__.py │ │ ├── ja_JP │ │ │ └── __init__.py │ │ ├── ka_GE │ │ │ └── __init__.py │ │ ├── ko_KR │ │ │ └── __init__.py │ │ ├── nl_NL │ │ │ └── __init__.py │ │ ├── no_NO │ │ │ └── __init__.py │ │ ├── pl_PL │ │ │ └── __init__.py │ │ ├── pt_BR │ │ │ └── __init__.py │ │ ├── pt_PT │ │ │ └── __init__.py │ │ ├── ro_RO │ │ │ └── __init__.py │ │ ├── ru_RU │ │ │ └── __init__.py │ │ ├── sk_SK │ │ │ └── __init__.py │ │ ├── sl_SI │ │ │ └── __init__.py │ │ ├── ta_IN │ │ │ └── __init__.py │ │ ├── th_TH │ │ │ └── __init__.py │ │ ├── tl_PH │ │ │ └── __init__.py │ │ ├── tr_TR │ │ │ └── __init__.py │ │ ├── uz_UZ │ │ │ └── __init__.py │ │ ├── vi_VN │ │ │ └── __init__.py │ │ ├── zh_CN │ │ │ └── __init__.py │ │ └── zh_TW │ │ │ └── __init__.py │ ├── doi │ │ └── __init__.py │ ├── emoji │ │ ├── __init__.py │ │ └── en_US │ │ │ └── __init__.py │ ├── file │ │ ├── __init__.py │ │ └── en_US │ │ │ └── __init__.py │ ├── geo │ │ ├── __init__.py │ │ ├── bn_BD │ │ │ └── __init__.py │ │ ├── cs_CZ │ │ │ └── __init__.py │ │ ├── de_AT │ │ │ └── __init__.py │ │ ├── el_GR │ │ │ └── __init__.py │ │ ├── en_IE │ │ │ └── __init__.py │ │ ├── en_US │ │ │ └── __init__.py │ │ ├── pl_PL │ │ │ └── __init__.py │ │ ├── pt_PT │ │ │ └── __init__.py │ │ ├── sk_SK │ │ │ └── __init__.py │ │ └── tr_TR │ │ │ └── __init__.py │ ├── internet │ │ ├── __init__.py │ │ ├── ar_AA │ │ │ └── __init__.py │ │ ├── az_AZ │ │ │ └── __init__.py │ │ ├── bg_BG │ │ │ └── __init__.py │ │ ├── bn_BD │ │ │ └── __init__.py │ │ ├── bs_BA │ │ │ └── __init__.py │ │ ├── cs_CZ │ │ │ └── __init__.py │ │ ├── de_AT │ │ │ └── __init__.py │ │ ├── de_DE │ │ │ └── __init__.py │ │ ├── el_GR │ │ │ └── __init__.py │ │ ├── en_AU │ │ │ └── __init__.py │ │ ├── en_GB │ │ │ └── __init__.py │ │ ├── en_NZ │ │ │ └── __init__.py │ │ ├── en_PH │ │ │ └── __init__.py │ │ ├── en_US │ │ │ └── __init__.py │ │ ├── es_AR │ │ │ └── __init__.py │ │ ├── es_CL │ │ │ └── __init__.py │ │ ├── es_ES │ │ │ └── __init__.py │ │ ├── fa_IR │ │ │ └── __init__.py │ │ ├── fi_FI │ │ │ └── __init__.py │ │ ├── fil_PH │ │ │ └── __init__.py │ │ ├── fr_CH │ │ │ └── __init__.py │ │ ├── fr_FR │ │ │ └── __init__.py │ │ ├── hr_HR │ │ │ └── __init__.py │ │ ├── hu_HU │ │ │ └── __init__.py │ │ ├── id_ID │ │ │ └── __init__.py │ │ ├── it_IT │ │ │ └── __init__.py │ │ ├── ja_JP │ │ │ └── __init__.py │ │ ├── ko_KR │ │ │ └── __init__.py │ │ ├── no_NO │ │ │ └── __init__.py │ │ ├── pl_PL │ │ │ └── __init__.py │ │ ├── pt_BR │ │ │ └── __init__.py │ │ ├── pt_PT │ │ │ └── __init__.py │ │ ├── ro_RO │ │ │ └── __init__.py │ │ ├── ru_RU │ │ │ └── __init__.py │ │ ├── sk_SK │ │ │ └── __init__.py │ │ ├── sl_SI │ │ │ └── __init__.py │ │ ├── sv_SE │ │ │ └── __init__.py │ │ ├── th_TH │ │ │ └── __init__.py │ │ ├── tl_PH │ │ │ └── __init__.py │ │ ├── tr_TR │ │ │ └── __init__.py │ │ ├── uk_UA │ │ │ └── __init__.py │ │ ├── zh_CN │ │ │ └── __init__.py │ │ └── zh_TW │ │ │ └── __init__.py │ ├── isbn │ │ ├── __init__.py │ │ ├── en_US │ │ │ └── __init__.py │ │ ├── es_ES │ │ │ └── __init__.py │ │ └── isbn.py │ ├── job │ │ ├── __init__.py │ │ ├── ar_AA │ │ │ └── __init__.py │ │ ├── az_AZ │ │ │ └── __init__.py │ │ ├── bn_BD │ │ │ └── __init__.py │ │ ├── bs_BA │ │ │ └── __init__.py │ │ ├── cs_CZ │ │ │ └── __init__.py │ │ ├── da_DK │ │ │ └── __init__.py │ │ ├── de_AT │ │ │ └── __init__.py │ │ ├── de_DE │ │ │ └── __init__.py │ │ ├── el_GR │ │ │ └── __init__.py │ │ ├── en_US │ │ │ └── __init__.py │ │ ├── es │ │ │ └── __init__.py │ │ ├── es_AR │ │ │ └── __init__.py │ │ ├── es_CL │ │ │ └── __init__.py │ │ ├── es_CO │ │ │ └── __init__.py │ │ ├── es_ES │ │ │ └── __init__.py │ │ ├── es_MX │ │ │ └── __init__.py │ │ ├── fa_IR │ │ │ └── __init__.py │ │ ├── fi_FI │ │ │ └── __init__.py │ │ ├── fr_CH │ │ │ └── __init__.py │ │ ├── fr_FR │ │ │ └── __init__.py │ │ ├── hr_HR │ │ │ └── __init__.py │ │ ├── hu_HU │ │ │ └── __init__.py │ │ ├── hy_AM │ │ │ └── __init__.py │ │ ├── ja_JP │ │ │ └── __init__.py │ │ ├── ka_GE │ │ │ └── __init__.py │ │ ├── ko_KR │ │ │ └── __init__.py │ │ ├── pl_PL │ │ │ └── __init__.py │ │ ├── pt_BR │ │ │ └── __init__.py │ │ ├── pt_PT │ │ │ └── __init__.py │ │ ├── ro_RO │ │ │ └── __init__.py │ │ ├── ru_RU │ │ │ └── __init__.py │ │ ├── sk_SK │ │ │ └── __init__.py │ │ ├── th_TH │ │ │ └── __init__.py │ │ ├── tr_TR │ │ │ └── __init__.py │ │ ├── uk_UA │ │ │ └── __init__.py │ │ ├── vi_VN │ │ │ └── __init__.py │ │ ├── zh_CN │ │ │ └── __init__.py │ │ └── zh_TW │ │ │ └── __init__.py │ ├── lorem │ │ ├── __init__.py │ │ ├── ar_AA │ │ │ └── __init__.py │ │ ├── az_AZ │ │ │ └── __init__.py │ │ ├── bn_BD │ │ │ └── __init__.py │ │ ├── cs_CZ │ │ │ └── __init__.py │ │ ├── da_DK │ │ │ └── __init__.py │ │ ├── de_AT │ │ │ └── __init__.py │ │ ├── de_DE │ │ │ └── __init__.py │ │ ├── el_GR │ │ │ └── __init__.py │ │ ├── en_PH │ │ │ └── __init__.py │ │ ├── en_US │ │ │ └── __init__.py │ │ ├── fa_IR │ │ │ └── __init__.py │ │ ├── fil_PH │ │ │ └── __init__.py │ │ ├── fr_FR │ │ │ └── __init__.py │ │ ├── he_IL │ │ │ └── __init__.py │ │ ├── hy_AM │ │ │ └── __init__.py │ │ ├── it_IT │ │ │ └── __init__.py │ │ ├── ja_JP │ │ │ └── __init__.py │ │ ├── la │ │ │ └── __init__.py │ │ ├── nl_BE │ │ │ └── __init__.py │ │ ├── nl_NL │ │ │ └── __init__.py │ │ ├── pl_PL │ │ │ └── __init__.py │ │ ├── ru_RU │ │ │ └── __init__.py │ │ ├── th_TH │ │ │ └── __init__.py │ │ ├── tl_PH │ │ │ └── __init__.py │ │ ├── uk_UA │ │ │ └── __init__.py │ │ ├── vi_VN │ │ │ └── __init__.py │ │ ├── zh_CN │ │ │ └── __init__.py │ │ └── zh_TW │ │ │ └── __init__.py │ ├── misc │ │ ├── __init__.py │ │ ├── en_PH │ │ │ └── __init__.py │ │ ├── en_US │ │ │ └── __init__.py │ │ ├── fil_PH │ │ │ └── __init__.py │ │ └── tl_PH │ │ │ └── __init__.py │ ├── passport │ │ ├── __init__.py │ │ ├── de_AT │ │ │ └── __init__.py │ │ ├── en_US │ │ │ └── __init__.py │ │ └── ru_RU │ │ │ └── __init__.py │ ├── person │ │ ├── __init__.py │ │ ├── ar_AA │ │ │ └── __init__.py │ │ ├── ar_PS │ │ │ └── __init__.py │ │ ├── ar_SA │ │ │ └── __init__.py │ │ ├── az_AZ │ │ │ └── __init__.py │ │ ├── bg_BG │ │ │ └── __init__.py │ │ ├── bn_BD │ │ │ └── __init__.py │ │ ├── cs_CZ │ │ │ └── __init__.py │ │ ├── da_DK │ │ │ └── __init__.py │ │ ├── de_AT │ │ │ └── __init__.py │ │ ├── de_CH │ │ │ └── __init__.py │ │ ├── de_DE │ │ │ └── __init__.py │ │ ├── de_LI │ │ │ └── __init__.py │ │ ├── de_LU │ │ │ └── __init__.py │ │ ├── el_GR │ │ │ └── __init__.py │ │ ├── en │ │ │ └── __init__.py │ │ ├── en_GB │ │ │ └── __init__.py │ │ ├── en_IE │ │ │ └── __init__.py │ │ ├── en_IN │ │ │ └── __init__.py │ │ ├── en_NZ │ │ │ └── __init__.py │ │ ├── en_PK │ │ │ └── __init__.py │ │ ├── en_TH │ │ │ └── __init__.py │ │ ├── en_US │ │ │ └── __init__.py │ │ ├── es │ │ │ └── __init__.py │ │ ├── es_AR │ │ │ └── __init__.py │ │ ├── es_CA │ │ │ └── __init__.py │ │ ├── es_CL │ │ │ └── __init__.py │ │ ├── es_CO │ │ │ └── __init__.py │ │ ├── es_ES │ │ │ └── __init__.py │ │ ├── es_MX │ │ │ └── __init__.py │ │ ├── et_EE │ │ │ └── __init__.py │ │ ├── fa_IR │ │ │ └── __init__.py │ │ ├── fi_FI │ │ │ └── __init__.py │ │ ├── fr_BE │ │ │ └── __init__.py │ │ ├── fr_CA │ │ │ └── __init__.py │ │ ├── fr_CH │ │ │ └── __init__.py │ │ ├── fr_FR │ │ │ └── __init__.py │ │ ├── fr_QC │ │ │ └── __init__.py │ │ ├── ga_IE │ │ │ └── __init__.py │ │ ├── gu_IN │ │ │ └── __init__.py │ │ ├── he_IL │ │ │ └── __init__.py │ │ ├── hi_IN │ │ │ └── __init__.py │ │ ├── hr_HR │ │ │ └── __init__.py │ │ ├── hu_HU │ │ │ └── __init__.py │ │ ├── hy_AM │ │ │ └── __init__.py │ │ ├── id_ID │ │ │ └── __init__.py │ │ ├── is_IS │ │ │ └── __init__.py │ │ ├── it_IT │ │ │ └── __init__.py │ │ ├── ja_JP │ │ │ └── __init__.py │ │ ├── ka_GE │ │ │ └── __init__.py │ │ ├── ko_KR │ │ │ └── __init__.py │ │ ├── lt_LT │ │ │ └── __init__.py │ │ ├── lv_LV │ │ │ └── __init__.py │ │ ├── ne_NP │ │ │ └── __init__.py │ │ ├── nl_BE │ │ │ └── __init__.py │ │ ├── nl_NL │ │ │ └── __init__.py │ │ ├── no_NO │ │ │ └── __init__.py │ │ ├── or_IN │ │ │ └── __init__.py │ │ ├── pl_PL │ │ │ └── __init__.py │ │ ├── pt_BR │ │ │ └── __init__.py │ │ ├── pt_PT │ │ │ └── __init__.py │ │ ├── ro_RO │ │ │ └── __init__.py │ │ ├── ru_RU │ │ │ └── __init__.py │ │ ├── sk_SK │ │ │ └── __init__.py │ │ ├── sl_SI │ │ │ └── __init__.py │ │ ├── sv_SE │ │ │ └── __init__.py │ │ ├── sw │ │ │ └── __init__.py │ │ ├── ta_IN │ │ │ └── __init__.py │ │ ├── th_TH │ │ │ └── __init__.py │ │ ├── tr_TR │ │ │ └── __init__.py │ │ ├── tw_GH │ │ │ └── __init__.py │ │ ├── uk_UA │ │ │ └── __init__.py │ │ ├── uz_UZ │ │ │ └── __init__.py │ │ ├── vi_VN │ │ │ └── __init__.py │ │ ├── yo_NG │ │ │ └── __init__.py │ │ ├── zh_CN │ │ │ └── __init__.py │ │ ├── zh_TW │ │ │ └── __init__.py │ │ └── zu_ZA │ │ │ └── __init__.py │ ├── phone_number │ │ ├── __init__.py │ │ ├── ar_AE │ │ │ └── __init__.py │ │ ├── ar_JO │ │ │ └── __init__.py │ │ ├── ar_PS │ │ │ └── __init__.py │ │ ├── az_AZ │ │ │ └── __init__.py │ │ ├── bg_BG │ │ │ └── __init__.py │ │ ├── bn_BD │ │ │ └── __init__.py │ │ ├── bs_BA │ │ │ └── __init__.py │ │ ├── cs_CZ │ │ │ └── __init__.py │ │ ├── da_DK │ │ │ └── __init__.py │ │ ├── de_AT │ │ │ └── __init__.py │ │ ├── de_CH │ │ │ └── __init__.py │ │ ├── de_DE │ │ │ └── __init__.py │ │ ├── de_LI │ │ │ └── __init__.py │ │ ├── de_LU │ │ │ └── __init__.py │ │ ├── el_GR │ │ │ └── __init__.py │ │ ├── en_AU │ │ │ └── __init__.py │ │ ├── en_CA │ │ │ └── __init__.py │ │ ├── en_GB │ │ │ └── __init__.py │ │ ├── en_IN │ │ │ └── __init__.py │ │ ├── en_NZ │ │ │ └── __init__.py │ │ ├── en_PH │ │ │ └── __init__.py │ │ ├── en_US │ │ │ └── __init__.py │ │ ├── es_AR │ │ │ └── __init__.py │ │ ├── es_CL │ │ │ └── __init__.py │ │ ├── es_CO │ │ │ └── __init__.py │ │ ├── es_ES │ │ │ └── __init__.py │ │ ├── es_MX │ │ │ └── __init__.py │ │ ├── fa_IR │ │ │ └── __init__.py │ │ ├── fi_FI │ │ │ └── __init__.py │ │ ├── fil_PH │ │ │ └── __init__.py │ │ ├── fr_CH │ │ │ └── __init__.py │ │ ├── fr_FR │ │ │ └── __init__.py │ │ ├── he_IL │ │ │ └── __init__.py │ │ ├── hi_IN │ │ │ └── __init__.py │ │ ├── hr_HR │ │ │ └── __init__.py │ │ ├── hu_HU │ │ │ └── __init__.py │ │ ├── hy_AM │ │ │ └── __init__.py │ │ ├── id_ID │ │ │ └── __init__.py │ │ ├── it_CH │ │ │ └── __init__.py │ │ ├── it_IT │ │ │ └── __init__.py │ │ ├── ja_JP │ │ │ └── __init__.py │ │ ├── ka_GE │ │ │ └── __init__.py │ │ ├── ko_KR │ │ │ └── __init__.py │ │ ├── lt_LT │ │ │ └── __init__.py │ │ ├── lv_LV │ │ │ └── __init__.py │ │ ├── ne_NP │ │ │ └── __init__.py │ │ ├── nl_BE │ │ │ └── __init__.py │ │ ├── nl_NL │ │ │ └── __init__.py │ │ ├── no_NO │ │ │ └── __init__.py │ │ ├── pl_PL │ │ │ └── __init__.py │ │ ├── pt_BR │ │ │ └── __init__.py │ │ ├── pt_PT │ │ │ └── __init__.py │ │ ├── ro_RO │ │ │ └── __init__.py │ │ ├── ru_RU │ │ │ └── __init__.py │ │ ├── sk_SK │ │ │ └── __init__.py │ │ ├── sl_SI │ │ │ └── __init__.py │ │ ├── sv_SE │ │ │ └── __init__.py │ │ ├── ta_IN │ │ │ └── __init__.py │ │ ├── th_TH │ │ │ └── __init__.py │ │ ├── tl_PH │ │ │ └── __init__.py │ │ ├── tr_TR │ │ │ └── __init__.py │ │ ├── tw_GH │ │ │ └── __init__.py │ │ ├── uk_UA │ │ │ └── __init__.py │ │ ├── uz_UZ │ │ │ └── __init__.py │ │ ├── vi_VN │ │ │ └── __init__.py │ │ ├── zh_CN │ │ │ └── __init__.py │ │ └── zh_TW │ │ │ └── __init__.py │ ├── profile │ │ ├── __init__.py │ │ └── en_US │ │ │ └── __init__.py │ ├── python │ │ ├── __init__.py │ │ └── en_US │ │ │ └── __init__.py │ ├── sbn │ │ ├── __init__.py │ │ ├── en_US │ │ │ └── __init__.py │ │ ├── rules.py │ │ └── sbn.py │ ├── ssn │ │ ├── __init__.py │ │ ├── az_AZ │ │ │ └── __init__.py │ │ ├── bg_BG │ │ │ └── __init__.py │ │ ├── bn_BD │ │ │ └── __init__.py │ │ ├── cs_CZ │ │ │ └── __init__.py │ │ ├── de_AT │ │ │ └── __init__.py │ │ ├── de_CH │ │ │ └── __init__.py │ │ ├── de_DE │ │ │ └── __init__.py │ │ ├── dk_DK │ │ │ └── __init__.py │ │ ├── el_CY │ │ │ └── __init__.py │ │ ├── el_GR │ │ │ └── __init__.py │ │ ├── en_CA │ │ │ └── __init__.py │ │ ├── en_GB │ │ │ └── __init__.py │ │ ├── en_IE │ │ │ └── __init__.py │ │ ├── en_IN │ │ │ └── __init__.py │ │ ├── en_PH │ │ │ └── __init__.py │ │ ├── en_US │ │ │ └── __init__.py │ │ ├── es_CA │ │ │ └── __init__.py │ │ ├── es_CL │ │ │ └── __init__.py │ │ ├── es_CO │ │ │ └── __init__.py │ │ ├── es_ES │ │ │ └── __init__.py │ │ ├── es_MX │ │ │ └── __init__.py │ │ ├── et_EE │ │ │ └── __init__.py │ │ ├── fi_FI │ │ │ └── __init__.py │ │ ├── fil_PH │ │ │ └── __init__.py │ │ ├── fr_CH │ │ │ └── __init__.py │ │ ├── fr_FR │ │ │ └── __init__.py │ │ ├── he_IL │ │ │ └── __init__.py │ │ ├── hr_HR │ │ │ └── __init__.py │ │ ├── hu_HU │ │ │ └── __init__.py │ │ ├── it_IT │ │ │ └── __init__.py │ │ ├── ko_KR │ │ │ └── __init__.py │ │ ├── lb_LU │ │ │ └── __init__.py │ │ ├── lt_LT │ │ │ └── __init__.py │ │ ├── lv_LV │ │ │ └── __init__.py │ │ ├── mt_MT │ │ │ └── __init__.py │ │ ├── nl_BE │ │ │ └── __init__.py │ │ ├── nl_NL │ │ │ └── __init__.py │ │ ├── no_NO │ │ │ └── __init__.py │ │ ├── pl_PL │ │ │ └── __init__.py │ │ ├── pt_BR │ │ │ └── __init__.py │ │ ├── pt_PT │ │ │ └── __init__.py │ │ ├── ro_RO │ │ │ └── __init__.py │ │ ├── ru_RU │ │ │ └── __init__.py │ │ ├── sk_SK │ │ │ └── __init__.py │ │ ├── sl_SI │ │ │ └── __init__.py │ │ ├── sv_SE │ │ │ └── __init__.py │ │ ├── th_TH │ │ │ └── __init__.py │ │ ├── tl_PH │ │ │ └── __init__.py │ │ ├── tr_TR │ │ │ └── __init__.py │ │ ├── uk_UA │ │ │ └── __init__.py │ │ ├── zh_CN │ │ │ └── __init__.py │ │ └── zh_TW │ │ │ └── __init__.py │ └── user_agent │ │ ├── __init__.py │ │ └── en_US │ │ └── __init__.py ├── proxy.py ├── proxy.pyi ├── py.typed ├── sphinx │ ├── __init__.py │ ├── autodoc.py │ ├── docstring.py │ ├── documentor.py │ └── validator.py ├── typing.py └── utils │ ├── __init__.py │ ├── checksums.py │ ├── datasets.py │ ├── decorators.py │ ├── distribution.py │ ├── loading.py │ └── text.py ├── generate_stubs.py ├── mypy.ini ├── readthedocs.yml ├── setup.cfg ├── setup.py ├── tests ├── __init__.py ├── conftest.py ├── mymodule │ ├── __init__.py │ └── en_US │ │ └── __init__.py ├── providers │ ├── __init__.py │ ├── conftest.py │ ├── test_address.py │ ├── test_automotive.py │ ├── test_bank.py │ ├── test_barcode.py │ ├── test_color.py │ ├── test_company.py │ ├── test_credit_card.py │ ├── test_currency.py │ ├── test_date_time.py │ ├── test_doi.py │ ├── test_dynamic.py │ ├── test_emoji.py │ ├── test_enum.py │ ├── test_file.py │ ├── test_geo.py │ ├── test_internet.py │ ├── test_isbn.py │ ├── test_job.py │ ├── test_lorem.py │ ├── test_misc.py │ ├── test_passport.py │ ├── test_person.py │ ├── test_phone_number.py │ ├── test_profile.py │ ├── test_python.py │ ├── test_sbn.py │ ├── test_ssn.py │ └── test_user_agent.py ├── pytest │ ├── __init__.py │ ├── session_overrides │ │ ├── __init__.py │ │ ├── conftest.py │ │ └── session_locale │ │ │ ├── __init__.py │ │ │ ├── conftest.py │ │ │ ├── test_autouse_faker_locale.py │ │ │ ├── test_autouse_faker_seed.py │ │ │ └── test_manual_injection.py │ ├── test_autouse_faker_locale.py │ ├── test_autouse_faker_seed.py │ ├── test_manual_injection.py │ └── test_unique_clear.py ├── sphinx │ ├── __init__.py │ ├── test_docstring.py │ └── test_validator.py ├── test_decode.py ├── test_factory.py ├── test_generator.py ├── test_optional.py ├── test_providers_formats.py ├── test_proxy.py ├── test_unique.py └── utils │ ├── __init__.py │ ├── random_state.json │ └── test_utils.py └── tox.ini /.bumpversion.cfg: -------------------------------------------------------------------------------- 1 | [bumpversion] 2 | current_version = 37.3.0 3 | files = VERSION faker/__init__.py docs/conf.py 4 | commit = True 5 | tag = True 6 | -------------------------------------------------------------------------------- /.coveragerc: -------------------------------------------------------------------------------- 1 | [paths] 2 | source = faker/ 3 | 4 | [run] 5 | omit = 6 | faker/sphinx/autodoc.py 7 | faker/sphinx/documentor.py 8 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | .git/ 2 | 3 | build 4 | dist 5 | *.egg-info 6 | *.egg/ 7 | *.pyc 8 | *.swp 9 | 10 | .tox 11 | .coverage 12 | html/* 13 | __pycache__ 14 | 15 | # Compiled Documentation 16 | docs/_build 17 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [joke2k] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 13 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | * Faker version: 2 | * OS: 3 | 4 | Brief summary of the issue goes here. 5 | 6 | ### Steps to reproduce 7 | 8 | 1. step 1 9 | 1. step 2 10 | 1. step 3 11 | 12 | ### Expected behavior 13 | 14 | X should be ... 15 | 16 | ### Actual behavior 17 | 18 | X is ... 19 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### What does this change 2 | 3 | Brief summary of the changes. 4 | 5 | ### What was wrong 6 | 7 | Description of the root cause of the issue. 8 | 9 | ### How this fixes it 10 | 11 | Description of how the changes fix the issue. 12 | 13 | Fixes #... 14 | 15 | ### Checklist 16 | 17 | - [ ] I have read the documentation about [CONTRIBUTING](https://github.com/joke2k/faker/blob/master/CONTRIBUTING.rst) 18 | - [ ] I have read the documentation about [Coding style](https://github.com/joke2k/faker/blob/master/docs/coding_style.rst) 19 | - [ ] I have run `make lint` 20 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "weekly" 7 | -------------------------------------------------------------------------------- /.github/workflows/gh-release.yml: -------------------------------------------------------------------------------- 1 | on: 2 | push: 3 | # Sequence of patterns matched against refs/tags 4 | tags: 5 | - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 6 | 7 | name: Create Release 8 | 9 | permissions: 10 | contents: read 11 | 12 | jobs: 13 | build: 14 | permissions: 15 | contents: write # for actions/create-release to create a release 16 | name: Create Release 17 | runs-on: ubuntu-latest 18 | steps: 19 | - name: Checkout code 20 | uses: actions/checkout@v4 21 | - name: Create Release 22 | id: create_release 23 | uses: actions/create-release@v1 24 | env: 25 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token 26 | with: 27 | tag_name: ${{ github.ref }} 28 | release_name: Release ${{ github.ref }} 29 | body: | 30 | See [CHANGELOG.md](https://github.com/joke2k/faker/blob/${{ github.ref }}/CHANGELOG.md). 31 | draft: false 32 | prerelease: false 33 | -------------------------------------------------------------------------------- /.github/workflows/issues.yml: -------------------------------------------------------------------------------- 1 | name: Close inactive issues 2 | on: 3 | schedule: 4 | - cron: "30 1 * * *" 5 | 6 | jobs: 7 | close-issues: 8 | runs-on: ubuntu-latest 9 | permissions: 10 | issues: write 11 | pull-requests: write 12 | steps: 13 | - uses: actions/stale@v9 14 | with: 15 | days-before-issue-stale: 90 16 | days-before-issue-close: 14 17 | exempt-issue-labels: 'awaiting-approval,work-in-progress' 18 | stale-issue-label: "stale" 19 | stale-issue-message: "This issue is stale because it has been open for 30 days with no activity." 20 | close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale." 21 | days-before-pr-stale: 90 22 | days-before-pr-close: 14 23 | repo-token: ${{ secrets.GITHUB_TOKEN }} 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__/ 2 | .mypy_cache/ 3 | *.py[cod] 4 | 5 | # C extensions 6 | *.so 7 | 8 | # Packages 9 | *.egg 10 | *.egg-info 11 | dist 12 | build 13 | docs/_build 14 | docs/locales.rst 15 | docs/locales/*.rst 16 | docs/providers.rst 17 | docs/providers/*.rst 18 | eggs 19 | .eggs 20 | parts 21 | var 22 | sdist 23 | develop-eggs 24 | .installed.cfg 25 | lib 26 | lib64 27 | 28 | # Installer logs 29 | pip-log.txt 30 | 31 | # Unit test / coverage reports 32 | .coverage 33 | .tox 34 | nosetests.xml 35 | 36 | # Translations 37 | *.mo 38 | 39 | # Mr Developer 40 | .mr.developer.cfg 41 | .project 42 | .pydevproject 43 | .python-version 44 | .idea 45 | .projectile 46 | .ropeproject 47 | .DS_Store 48 | .venv 49 | 50 | # IDE 51 | *.sw[po] 52 | *.iml 53 | *.ipr 54 | venv/ 55 | .vscode 56 | -------------------------------------------------------------------------------- /.isort.cfg: -------------------------------------------------------------------------------- 1 | [settings] 2 | line_length=120 3 | multi_line_output=3 4 | known_first_party=faker 5 | sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER 6 | use_parentheses=true 7 | include_trailing_comma=true 8 | lines_between_types=1 9 | profile=black 10 | -------------------------------------------------------------------------------- /CITATION.cff: -------------------------------------------------------------------------------- 1 | authors: 2 | - family-names: Faraglia 3 | given-names: Daniele 4 | - name: "Other Contributors" 5 | cff-version: 1.2.0 6 | license: MIT 7 | message: If you use this software, please cite it using these metadata. 8 | repository-code: "https://github.com/joke2k/faker" 9 | title: "Faker" 10 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Daniele Faraglia 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include README.rst 2 | include LICENSE.txt 3 | include CONTRIBUTING.rst 4 | include CHANGELOG.md 5 | include RELEASE_PROCESS.rst 6 | include VERSION 7 | include CITATION.cff 8 | include mypy.ini 9 | include tox.ini 10 | include faker/proxy.pyi 11 | recursive-include tests *.json 12 | recursive-include tests *.py 13 | recursive-exclude faker/sphinx *.py 14 | recursive-exclude tests/sphinx *.py 15 | 16 | global-exclude *.py[cod] __pycache__ *.so 17 | exclude Makefile .coveragerc .bumpversion.cfg .dockerignore .isort.cfg generate_stubs.py 18 | exclude ISSUE_TEMPLATE.md PULL_REQUEST_TEMPLATE.md 19 | exclude appveyor.yml readthedocs.yml 20 | exclude build-alpine.sh 21 | exclude build32bit.sh 22 | exclude dev-requirements.txt 23 | prune docs 24 | prune .circleci 25 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | test: 2 | tox -e py 3 | 4 | flake8: 5 | flake8 --extend-ignore=E203 faker tests 6 | 7 | mypy: 8 | mypy --install-types --non-interactive --config mypy.ini faker 9 | 10 | black: 11 | black --line-length 120 . 12 | 13 | isort: 14 | isort --atomic . 15 | 16 | generate-stubs: 17 | python3.11 generate_stubs.py 18 | 19 | lint: generate-stubs isort black mypy flake8 20 | 21 | release: 22 | check-manifest 23 | rm -rf build dist 24 | python setup.py sdist bdist_wheel 25 | git push --tags 26 | twine upload dist/* 27 | -------------------------------------------------------------------------------- /RELEASE_PROCESS.rst: -------------------------------------------------------------------------------- 1 | Release Process 2 | --------------- 3 | 4 | This project releases automatically every time a PR is squash-merged. 5 | 6 | The changelog is updated with a new entry containing the message commit, and the 7 | library version number is incremented according the the labels on the PR: 8 | 9 | * ``bump-version:major``: Increments the MAJOR version 10 | * ``bump-version:minor``: Increments the MINOR version 11 | * None of the above: Increments the PATCH version. 12 | 13 | If more than one label is applied to the PR, only the highest part gets incremented. 14 | 15 | Bugfixes and Pull requests updating data for existing providers will result in a patch bump. 16 | 17 | Pull requests that adds new methods to existing providers, or add new providers will 18 | result in a minor bump. 19 | 20 | Breaking changes such as change of functionality, removal of methods, etc will result in 21 | a major bump. 22 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 37.3.0 2 | -------------------------------------------------------------------------------- /build-alpine.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ -z "${TEST_ALPINE}" ]]; then 4 | echo "Not on Travis" 5 | exit 0 6 | fi 7 | 8 | docker run -v ${PWD}:/code -e INSTALL_REQUIREMENTS=${INSTALL_REQUIREMENTS} python:3.12-alpine sh -c " 9 | apk update \ 10 | && apk add git build-base jpeg-dev zlib-dev \ 11 | && pip install tox coveralls \ 12 | && export LANG='en_US.UTF-8' \ 13 | && cd /code \ 14 | && tox -e py\ 15 | && coverage report" 16 | -------------------------------------------------------------------------------- /dev-requirements.txt: -------------------------------------------------------------------------------- 1 | black>=24.8.0 2 | check-manifest 3 | coverage>=5.2 4 | doc8>=1.1.1 5 | flake8-comprehensions 6 | flake8>=4.0.0 7 | freezegun>=1.5.1 8 | isort>=5.13.2 9 | mypy-extensions>=1.0.0 10 | mypy>=1.15.0 11 | packaging>=24.2 12 | pytest>=6.0.1 13 | setuptools>=75.8.2 14 | tox>=4.24.1 15 | twine>=6.1.0 16 | validators>=0.34.0 17 | wheel>=0.45.1 18 | -------------------------------------------------------------------------------- /docs/_templates/breadcrumbs.html: -------------------------------------------------------------------------------- 1 | {%- extends "sphinx_rtd_theme/breadcrumbs.html" %} 2 | 3 | {% block breadcrumbs_aside %} 4 | {% if not meta or meta.get('github_url') != 'hide' %} 5 | {{ super() }} 6 | {% endif %} 7 | {% endblock %} 8 | -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | .. Faker documentation master file, created by 2 | sphinx-quickstart on Tue Mar 11 11:25:48 2014. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to Faker's documentation! 7 | ================================= 8 | 9 | .. include:: ../README.rst 10 | 11 | 12 | Contents 13 | -------- 14 | 15 | .. toctree:: 16 | :maxdepth: 2 17 | 18 | fakerclass 19 | providers 20 | communityproviders 21 | locales 22 | pytest-fixtures 23 | coding_style 24 | writing-docs 25 | 26 | 27 | 28 | Indices and tables 29 | ================== 30 | 31 | * :ref:`genindex` 32 | * :ref:`modindex` 33 | * :ref:`search` 34 | -------------------------------------------------------------------------------- /docs/locales/.happygit: -------------------------------------------------------------------------------- 1 | # this file is intentionally empty so that git can keep track of this directory -------------------------------------------------------------------------------- /docs/providers/.happygit: -------------------------------------------------------------------------------- 1 | # this file is intentionally empty so that git can keep track of this directory -------------------------------------------------------------------------------- /faker/__init__.py: -------------------------------------------------------------------------------- 1 | from faker.factory import Factory 2 | from faker.generator import Generator 3 | from faker.proxy import Faker 4 | 5 | VERSION = "37.3.0" 6 | 7 | __all__ = ("Factory", "Generator", "Faker") 8 | -------------------------------------------------------------------------------- /faker/__main__.py: -------------------------------------------------------------------------------- 1 | if __name__ == "__main__": 2 | from .cli import execute_from_command_line 3 | 4 | execute_from_command_line() 5 | -------------------------------------------------------------------------------- /faker/config.py: -------------------------------------------------------------------------------- 1 | from importlib import import_module 2 | 3 | from .utils.loading import find_available_locales, find_available_providers 4 | 5 | DEFAULT_LOCALE = "en_US" 6 | 7 | META_PROVIDERS_MODULES = [ 8 | "faker.providers", 9 | ] 10 | 11 | PROVIDERS = find_available_providers([import_module(path) for path in META_PROVIDERS_MODULES]) 12 | 13 | AVAILABLE_LOCALES = find_available_locales(PROVIDERS) 14 | -------------------------------------------------------------------------------- /faker/contrib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joke2k/faker/cfca7ca223cdeac1afeb4c0ed739f6bc7e608e92/faker/contrib/__init__.py -------------------------------------------------------------------------------- /faker/contrib/pytest/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joke2k/faker/cfca7ca223cdeac1afeb4c0ed739f6bc7e608e92/faker/contrib/pytest/__init__.py -------------------------------------------------------------------------------- /faker/contrib/pytest/plugin.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | 3 | from faker import Faker 4 | from faker.config import DEFAULT_LOCALE 5 | 6 | DEFAULT_SEED = 0 7 | 8 | 9 | @pytest.fixture(scope="session", autouse=True) 10 | def _session_faker(request): 11 | """Fixture that stores the session level ``Faker`` instance. 12 | 13 | This fixture is internal and is only meant for use within the project. 14 | Third parties should instead use the ``faker`` fixture for their tests. 15 | """ 16 | if "faker_session_locale" in request.fixturenames: 17 | locale = request.getfixturevalue("faker_session_locale") 18 | else: 19 | locale = [DEFAULT_LOCALE] 20 | return Faker(locale=locale) 21 | 22 | 23 | @pytest.fixture() 24 | def faker(request): 25 | """Fixture that returns a seeded and suitable ``Faker`` instance.""" 26 | if "faker_locale" in request.fixturenames: 27 | locale = request.getfixturevalue("faker_locale") 28 | fake = Faker(locale=locale) 29 | else: 30 | fake = request.getfixturevalue("_session_faker") 31 | 32 | seed = DEFAULT_SEED 33 | if "faker_seed" in request.fixturenames: 34 | seed = request.getfixturevalue("faker_seed") 35 | fake.seed_instance(seed=seed) 36 | fake.unique.clear() 37 | 38 | return fake 39 | -------------------------------------------------------------------------------- /faker/decode/__init__.py: -------------------------------------------------------------------------------- 1 | from .codes import codes 2 | 3 | 4 | def unidecode(txt: str) -> str: 5 | chars = "" 6 | for ch in txt: 7 | codepoint = ord(ch) 8 | 9 | try: 10 | chars += codes[codepoint] 11 | except IndexError: 12 | pass 13 | return chars 14 | -------------------------------------------------------------------------------- /faker/exceptions.py: -------------------------------------------------------------------------------- 1 | class BaseFakerException(Exception): 2 | """The base exception for all Faker exceptions.""" 3 | 4 | 5 | class UniquenessException(BaseFakerException): 6 | """To avoid infinite loops, after a certain number of attempts, 7 | the "unique" attribute of the Proxy will throw this exception. 8 | """ 9 | 10 | 11 | class UnsupportedFeature(BaseFakerException): 12 | """The requested feature is not available on this system.""" 13 | 14 | def __init__(self, msg: str, name: str) -> None: 15 | self.name = name 16 | super().__init__(msg) 17 | -------------------------------------------------------------------------------- /faker/providers/address/fil_PH/__init__.py: -------------------------------------------------------------------------------- 1 | from ..en_PH import Provider as EnPhAddressProvider 2 | 3 | 4 | class Provider(EnPhAddressProvider): 5 | """No difference from Address Provider for en_PH locale""" 6 | 7 | pass 8 | -------------------------------------------------------------------------------- /faker/providers/address/tl_PH/__init__.py: -------------------------------------------------------------------------------- 1 | from ..en_PH import Provider as EnPhAddressProvider 2 | 3 | 4 | class Provider(EnPhAddressProvider): 5 | """No difference from Address Provider for en_PH locale""" 6 | 7 | pass 8 | -------------------------------------------------------------------------------- /faker/providers/automotive/ar_BH/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as AutomotiveProvider 2 | 3 | 4 | class Provider(AutomotiveProvider): 5 | """Implement automotive provider for ``ar_BH`` locale. 6 | 7 | Source: 8 | 9 | - https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Bahrain 10 | """ 11 | 12 | license_formats = ("######",) 13 | -------------------------------------------------------------------------------- /faker/providers/automotive/da_DK/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as AutomotiveProvider 2 | 3 | 4 | class Provider(AutomotiveProvider): 5 | """Implement automotive provider for ``da_DK`` locale. 6 | Source: https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Denmark 7 | """ 8 | 9 | license_formats = ("?? ## ###",) 10 | -------------------------------------------------------------------------------- /faker/providers/automotive/el_GR/__init__.py: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | from .. import Provider as AutomotiveProvider 4 | 5 | 6 | class Provider(AutomotiveProvider): 7 | """Implement automotive provider for ``el_GR`` locale.""" 8 | 9 | uppercase_letters = "ABEZHIKMNOPTYX" 10 | 11 | license_formats = ( 12 | "??? ####", 13 | "?? ####", 14 | ) 15 | 16 | def license_plate(self) -> str: 17 | """Generate a license plate.""" 18 | temp = re.sub( 19 | r"\?", 20 | lambda x: self.random_element(self.uppercase_letters), 21 | self.random_element(self.license_formats), 22 | ) 23 | return self.numerify(temp) 24 | -------------------------------------------------------------------------------- /faker/providers/automotive/en_CA/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as AutomotiveProvider 2 | 3 | 4 | class Provider(AutomotiveProvider): 5 | """Implement automotive provider for ``en_CA`` locale. 6 | 7 | Sources: 8 | 9 | - https://www.revolvy.com/main/index.php?s=Canadian%20licence%20plate%20designs%20and%20serial%20formats 10 | """ 11 | 12 | license_formats = ( 13 | # Alberta 14 | "???-####", 15 | # BC 16 | "??# ##?", 17 | "?? ####", 18 | # Manitoba 19 | "??? ###", 20 | # New Brunswick 21 | "??? ###", 22 | # Newfoundland and Labrador 23 | "??? ###", 24 | # NWT 25 | "######", 26 | # Nova Scotia 27 | "??? ###", 28 | # Nunavut 29 | "### ###", 30 | # Ontario 31 | "### ???", 32 | "???? ###", 33 | "??# ###", 34 | "### #??", 35 | "?? ####", 36 | "GV??-###", 37 | # PEI 38 | "## ##??", 39 | # Quebec 40 | "?## ???", 41 | # Saskatchewan 42 | "### ???", 43 | # Yukon 44 | "???##", 45 | ) 46 | -------------------------------------------------------------------------------- /faker/providers/automotive/en_GB/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as AutomotiveProvider 2 | 3 | 4 | class Provider(AutomotiveProvider): 5 | """Implement automotive provider for ``en_GB`` locale. 6 | 7 | Sources: 8 | 9 | - https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_the_United_Kingdom 10 | """ 11 | 12 | license_formats = ( 13 | "??## ???", 14 | "??##???", 15 | ) 16 | -------------------------------------------------------------------------------- /faker/providers/automotive/en_NZ/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as AutomotiveProvider 2 | 3 | 4 | class Provider(AutomotiveProvider): 5 | """Implement automotive provider for ``en_NZ`` locale. 6 | 7 | Sources: 8 | 9 | - https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_New_Zealand 10 | """ 11 | 12 | license_formats = ( 13 | # Old plates 14 | "??%##", 15 | "??%###", 16 | "??%###", 17 | # Three letters since 2002 18 | "A??%##", 19 | "B??%##", 20 | "C??%##", 21 | "D??%##", 22 | "E??%##", 23 | "F??%##", 24 | "G??%##", 25 | "H??%##", 26 | "J??%##", 27 | "K??%##", 28 | "L??%##", 29 | "M??%##", 30 | # After 2018 31 | "N??%##", 32 | ) 33 | -------------------------------------------------------------------------------- /faker/providers/automotive/es_CO/__init__.py: -------------------------------------------------------------------------------- 1 | from collections import OrderedDict 2 | 3 | from .. import Provider as AutomotiveProvider 4 | 5 | 6 | class Provider(AutomotiveProvider): 7 | license_formats = OrderedDict( 8 | [ 9 | ("???###", 0.6), 10 | ("???##?", 0.3), 11 | ("T####", 0.03), 12 | ("??####", 0.01), 13 | ("R#####", 0.03), 14 | ("S#####", 0.03), 15 | ] 16 | ) 17 | -------------------------------------------------------------------------------- /faker/providers/automotive/et_EE/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as AutomotiveProvider 2 | 3 | 4 | class Provider(AutomotiveProvider): 5 | """Implement automotive provider for ``et_EE`` locale. 6 | 7 | Source: 8 | 9 | - https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Estonia 10 | """ 11 | 12 | license_formats = ("### ???",) 13 | -------------------------------------------------------------------------------- /faker/providers/automotive/fi_FI/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as AutomotiveProvider 2 | 3 | 4 | class Provider(AutomotiveProvider): 5 | """Implement automotive provider for ``fi_FI`` locale. 6 | 7 | Source: 8 | 9 | - https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Finland 10 | """ 11 | 12 | license_formats = ("???-###",) 13 | -------------------------------------------------------------------------------- /faker/providers/automotive/fil_PH/__init__.py: -------------------------------------------------------------------------------- 1 | from ..en_PH import Provider as EnPhAutomotiveProvider 2 | 3 | 4 | class Provider(EnPhAutomotiveProvider): 5 | """Implement automotive provider for ``fil_PH`` locale. 6 | 7 | There is no difference from the ``en_PH`` implementation. 8 | """ 9 | 10 | pass 11 | -------------------------------------------------------------------------------- /faker/providers/automotive/fr_FR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as AutomotiveProvider 2 | 3 | 4 | class Provider(AutomotiveProvider): 5 | """Implement automotive provider for ``fr_FR`` locale. 6 | 7 | Sources: 8 | 9 | - https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_France 10 | """ 11 | 12 | license_formats = ( 13 | # New format 14 | "??-###-??", 15 | # Old format for plates < 2009 16 | "###-???-##", 17 | ) 18 | -------------------------------------------------------------------------------- /faker/providers/automotive/he_IL/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as AutomotiveProvider 2 | 3 | 4 | class Provider(AutomotiveProvider): 5 | """Implement automotive provider for ``he_IL`` locale.""" 6 | 7 | """ Source : https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Israel """ 8 | license_formats = ( 9 | "###-##-###", 10 | "##-###-##", 11 | ) 12 | -------------------------------------------------------------------------------- /faker/providers/automotive/hu_HU/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as AutomotiveProvider 2 | 3 | 4 | class Provider(AutomotiveProvider): 5 | """Implement automotive provider for ``hu_HU`` locale. 6 | 7 | Sources: 8 | 9 | - https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Hungary 10 | """ 11 | 12 | license_formats = ("???-###",) 13 | -------------------------------------------------------------------------------- /faker/providers/automotive/id_ID/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as AutomotiveProvider 2 | 3 | 4 | class Provider(AutomotiveProvider): 5 | """Implement automotive provider for ``id_ID`` locale.""" 6 | 7 | license_formats = ( 8 | "? ### ??", 9 | "? ### ???", 10 | "?? ### ??", 11 | "?? ### ???", 12 | "? #### ??", 13 | "? #### ???", 14 | "?? #### ??", 15 | "?? #### ???", 16 | ) 17 | -------------------------------------------------------------------------------- /faker/providers/automotive/it_IT/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as AutomotiveProvider 2 | 3 | 4 | class Provider(AutomotiveProvider): 5 | """Implement automotive provider for ``it_IT`` locale. 6 | 7 | Sources: 8 | 9 | - https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Italy 10 | """ 11 | 12 | license_formats = ( 13 | # 1994-present 14 | "??###??", 15 | ) 16 | -------------------------------------------------------------------------------- /faker/providers/automotive/lt_LT/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as AutomotiveProvider 2 | 3 | 4 | class Provider(AutomotiveProvider): 5 | """Implement automotive provider for ``lt_LT`` locale. 6 | 7 | Source: 8 | 9 | - https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Lithuania 10 | """ 11 | 12 | license_formats = ("??? ###",) 13 | -------------------------------------------------------------------------------- /faker/providers/automotive/nl_BE/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as AutomotiveProvider 2 | 3 | 4 | class Provider(AutomotiveProvider): 5 | """Implement automotive provider for `nl_BE` locale. 6 | 7 | https://nl.wikipedia.org/wiki/Belgisch_kenteken 8 | """ 9 | 10 | license_formats = ( 11 | "???-###", # 1973-2008 12 | "###-???", # 2008-2010 13 | # New formats after 2010 14 | "1-???-###", 15 | "2-???-###", 16 | ) 17 | -------------------------------------------------------------------------------- /faker/providers/automotive/no_NO/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as AutomotiveProvider 2 | 3 | 4 | class Provider(AutomotiveProvider): 5 | """Implement automotive provider for ``hu_HU`` locale. 6 | 7 | Sources: 8 | 9 | - https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Norway 10 | """ 11 | 12 | license_formats = ( 13 | # Classic format 14 | "?? #####", 15 | ) 16 | -------------------------------------------------------------------------------- /faker/providers/automotive/pl_PL/__init__.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | from .. import Provider as AutomotiveProvider 4 | 5 | 6 | class Provider(AutomotiveProvider): 7 | """Implement automotive provider for ``pl_PL`` locale. 8 | 9 | Sources: 10 | 11 | - https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Poland 12 | """ 13 | 14 | license_formats = ( 15 | "?? #####", 16 | "?? ####?", 17 | "?? ###??", 18 | "?? #?###", 19 | "?? #??##", 20 | "??? ?###", 21 | "??? ##??", 22 | "??? #?##", 23 | "??? ##?#", 24 | "??? #??#", 25 | "??? ??##", 26 | "??? #####", 27 | "??? ####?", 28 | "??? ###??", 29 | ) 30 | 31 | def license_plate_regex_formats(self) -> List[str]: 32 | """Return a regex for matching license plates. 33 | 34 | .. warning:: 35 | This is technically not a method that generates fake data, and it 36 | should not be part of the public API. User should refrain from using 37 | this method. 38 | """ 39 | return [plate.replace("?", "[A-Z]").replace("#", "[0-9]") for plate in self.license_formats] 40 | -------------------------------------------------------------------------------- /faker/providers/automotive/pt_BR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as AutomotiveProvider 2 | 3 | 4 | class Provider(AutomotiveProvider): 5 | """Implement automotive provider for ``pt_BR`` locale.""" 6 | 7 | license_formats = ("???-#?##",) 8 | -------------------------------------------------------------------------------- /faker/providers/automotive/pt_PT/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as AutomotiveProvider 2 | 3 | 4 | class Provider(AutomotiveProvider): 5 | """Implement automotive provider for ``pt_PT`` locale. 6 | 7 | Sources: 8 | 9 | - https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Portugal 10 | """ 11 | 12 | license_formats = ( 13 | "##-##-??", 14 | "##-??-##", 15 | "??-##-##", 16 | # New format since March 2020 17 | "??-##-??", 18 | ) 19 | -------------------------------------------------------------------------------- /faker/providers/automotive/sq_AL/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as AutomotiveProvider 2 | 3 | 4 | class Provider(AutomotiveProvider): 5 | """Implement automotive provider for ``sq_AL`` locale. 6 | 7 | Source: 8 | 9 | - https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Albania 10 | """ 11 | 12 | license_formats = ("?? ###??",) 13 | -------------------------------------------------------------------------------- /faker/providers/automotive/sv_SE/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as AutomotiveProvider 2 | 3 | 4 | class Provider(AutomotiveProvider): 5 | """Implement automotive provider for ``sv_SE`` locale. 6 | 7 | Sources: 8 | 9 | - https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Sweden 10 | - https://www.transportstyrelsen.se/en/road/Vehicles/license-plates/ 11 | """ 12 | 13 | license_formats = ( 14 | # Classic format 15 | "??? ###", 16 | # New format 17 | "??? ##?", 18 | ) 19 | -------------------------------------------------------------------------------- /faker/providers/automotive/th_TH/__init__.py: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | from .. import Provider as AutomotiveProvider 4 | 5 | 6 | class Provider(AutomotiveProvider): 7 | """Implement automotive provider for ``th_TH`` locale. 8 | 9 | Sources: 10 | 11 | - https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Thailand 12 | """ 13 | 14 | license_formats = ( 15 | "# ?? ####", 16 | "# ?? ###", 17 | "# ?? ##", 18 | "# ?? #", 19 | "?? ####", 20 | "?? ###", 21 | "?? ##", 22 | "?? #", 23 | "??? ###", 24 | "??? ##", 25 | "??? #", 26 | "##-####", 27 | ) 28 | 29 | thai_consonants = "กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรลวศษสหฬอฮ" 30 | 31 | def license_plate(self) -> str: 32 | """Generate a license plate.""" 33 | 34 | temp = re.sub( 35 | r"\?", 36 | lambda x: self.random_element(self.thai_consonants), 37 | self.random_element(self.license_formats), 38 | ) 39 | return self.numerify(temp) 40 | -------------------------------------------------------------------------------- /faker/providers/automotive/tl_PH/__init__.py: -------------------------------------------------------------------------------- 1 | from ..en_PH import Provider as EnPhAutomotiveProvider 2 | 3 | 4 | class Provider(EnPhAutomotiveProvider): 5 | """Implement automotive provider for ``tl_PH`` locale. 6 | 7 | There is no difference from the ``en_PH`` implementation. 8 | """ 9 | 10 | pass 11 | -------------------------------------------------------------------------------- /faker/providers/automotive/tr_TR/__init__.py: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | from .. import Provider as AutomotiveProvider 4 | 5 | 6 | class Provider(AutomotiveProvider): 7 | """Implement automotive provider for ``tr_TR`` locale. 8 | 9 | Sources: 10 | 11 | - https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Turkey 12 | """ 13 | 14 | license_formats = ( 15 | "## ? ####", 16 | "## ? #####", 17 | "## ?? ###", 18 | "## ?? ####", 19 | "## ??? ##", 20 | "## ??? ###", 21 | ) 22 | ascii_uppercase_turkish = "ABCDEFGHIJKLMNOPRSTUVYZ" 23 | 24 | def license_plate(self) -> str: 25 | """Generate a license plate.""" 26 | temp = re.sub( 27 | r"\?", 28 | lambda x: self.random_element(self.ascii_uppercase_turkish), 29 | self.random_element(self.license_formats), 30 | ) 31 | temp = temp.replace("##", "{:02d}", 1) 32 | temp = temp.format(self.random_element(range(1, 82))) 33 | return self.numerify(temp) 34 | -------------------------------------------------------------------------------- /faker/providers/automotive/vi_VN/__init__.py: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | from .. import Provider as AutomotiveProvider 4 | 5 | 6 | class Provider(AutomotiveProvider): 7 | """Implement automotive provider for ``vi_VN`` locale. 8 | 9 | Sources: 10 | 11 | - https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Vietnam 12 | """ 13 | 14 | license_formats = ("##?-#####",) 15 | ascii_uppercase_vietnamese = "ABCDĐEFGHKLMNPSTUVXYZ" 16 | 17 | def license_plate(self) -> str: 18 | """Generate a license plate.""" 19 | temp = re.sub( 20 | r"\?", 21 | lambda x: self.random_element(self.ascii_uppercase_vietnamese), 22 | self.random_element(self.license_formats), 23 | ) 24 | return self.numerify(temp) 25 | -------------------------------------------------------------------------------- /faker/providers/automotive/zh_CN/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as AutomotiveProvider 2 | 3 | 4 | class Provider(AutomotiveProvider): 5 | """ 6 | Implement automotive provider for `zh_CN` locale. 7 | electric vehicles or downtown-restricted plates are not included 8 | """ 9 | 10 | province_code = ( 11 | "京", 12 | "津", 13 | "冀", 14 | "晋", 15 | "蒙", 16 | "辽", 17 | "吉", 18 | "黑", 19 | "沪", 20 | "苏", 21 | "浙", 22 | "皖", 23 | "闽", 24 | "赣", 25 | "鲁", 26 | "豫", 27 | "鄂", 28 | "湘", 29 | "粤", 30 | "桂", 31 | "琼", 32 | "渝", 33 | "川", 34 | "贵", 35 | "云", 36 | "藏", 37 | "陕", 38 | "甘", 39 | "青", 40 | "宁", 41 | "新", 42 | ) 43 | 44 | def license_plate(self) -> str: 45 | """Generate a license plate.""" 46 | pattern: str = str(self.random_element(self.province_code)) + self.random_uppercase_letter() + "-#####" 47 | return self.numerify(self.generator.parse(pattern)) 48 | -------------------------------------------------------------------------------- /faker/providers/automotive/zh_TW/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as AutomotiveProvider 2 | 3 | 4 | class Provider(AutomotiveProvider): 5 | """Implement automotive provider for ``zh_TW`` locale. 6 | 7 | Sources: 8 | - https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Taiwan 9 | 10 | """ 11 | 12 | license_formats = ( 13 | "####-??", 14 | "??-####", 15 | # Commercial vehicles since 2012 16 | "???-###", 17 | # New format since 2014 18 | "???-####", 19 | ) 20 | -------------------------------------------------------------------------------- /faker/providers/bank/az_AZ/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BankProvider 2 | 3 | 4 | class Provider(BankProvider): 5 | """Implement bank provider for ``az_AZ`` locale.""" 6 | 7 | bban_format = "????####################" 8 | country_code = "AZ" 9 | 10 | banks = ( 11 | "AccessBank", 12 | "AFB Bank", 13 | "Azərbaycan Sənaye Bankı", 14 | "Azər Türk Bank", 15 | "Bank Avrasiya", 16 | "Bank BTB", 17 | "Bank Melli Iran", 18 | "Bank of Baku", 19 | "Bank Respublika", 20 | "Expressbank", 21 | "Günay Bank", 22 | "Kapital Bank", 23 | "MuğanBank", 24 | "Naxçıvan Bank", 25 | "National Bank of Pakistan", 26 | "PAŞA Bank", 27 | "Premium Bank", 28 | "Rabitəbank", 29 | "TuranBank", 30 | "Unibank", 31 | "VTB Bank", 32 | "Xalq Bank", 33 | "Yapıkredi Bank Azərbaycan", 34 | "Yelo Bank", 35 | "Ziraat Bank Azərbaycan", 36 | ) 37 | 38 | def bank(self) -> str: 39 | """Generate a bank name.""" 40 | return self.random_element(self.banks) 41 | -------------------------------------------------------------------------------- /faker/providers/bank/cs_CZ/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BankProvider 2 | 3 | 4 | class Provider(BankProvider): 5 | """Implement bank provider for ``cs_CZ`` locale. 6 | 7 | https://www.mbank.cz/informace-k-produktum/info/ucty/cislo-uctu-iban.html 8 | """ 9 | 10 | bban_format = "####################" 11 | country_code = "CZ" 12 | -------------------------------------------------------------------------------- /faker/providers/bank/da_DK/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BankProvider 2 | 3 | 4 | class Provider(BankProvider): 5 | """Implement bank provider for ``da_DK`` locale.""" 6 | 7 | bban_format = "################" 8 | country_code = "DK" 9 | -------------------------------------------------------------------------------- /faker/providers/bank/de_AT/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BankProvider 2 | 3 | 4 | class Provider(BankProvider): 5 | """Implement bank provider for ``de_AT`` locale.""" 6 | 7 | bban_format = "################" 8 | country_code = "AT" 9 | -------------------------------------------------------------------------------- /faker/providers/bank/de_CH/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BankProvider 2 | 3 | 4 | class Provider(BankProvider): 5 | """Implement bank provider for ``de_CH`` locale.""" 6 | 7 | bban_format = "#################" 8 | country_code = "CH" 9 | -------------------------------------------------------------------------------- /faker/providers/bank/de_DE/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BankProvider 2 | 3 | 4 | class Provider(BankProvider): 5 | """Implement bank provider for ``de_DE`` locale. 6 | 7 | Source for rules for swift location codes: 8 | 9 | - https://www.ebics.de/de/datenformate 10 | """ 11 | 12 | bban_format = "##################" 13 | country_code = "DE" 14 | 15 | first_place = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "23456789" 16 | second_place = "ABCDEFGHIJKLMNPQRSTUVWXYZ" + "0123456789" 17 | swift_location_codes = [] 18 | for i in first_place: 19 | for j in second_place: 20 | swift_location_codes.append(str(i) + str(j)) 21 | swift_location_codes = tuple(swift_location_codes) 22 | -------------------------------------------------------------------------------- /faker/providers/bank/el_GR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BankProvider 2 | 3 | 4 | class Provider(BankProvider): 5 | """Implement bank provider for ``el_GR`` locale.""" 6 | 7 | bban_format = "#######################" 8 | country_code = "GR" 9 | -------------------------------------------------------------------------------- /faker/providers/bank/en_GB/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BankProvider 2 | 3 | 4 | class Provider(BankProvider): 5 | """Implement bank provider for ``en_GB`` locale.""" 6 | 7 | bban_format = "????##############" 8 | country_code = "GB" 9 | -------------------------------------------------------------------------------- /faker/providers/bank/en_IE/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BankProvider 2 | 3 | 4 | class Provider(BankProvider): 5 | """Implement bank provider for ``en_IE`` locale.""" 6 | 7 | bban_format = "#######################" 8 | country_code = "IE" 9 | -------------------------------------------------------------------------------- /faker/providers/bank/es_AR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BankProvider 2 | 3 | 4 | class Provider(BankProvider): 5 | """Implement bank provider for ``es_AR`` locale. 6 | source: https://www.bcra.gob.ar/SistemasFinancierosYdePagos/Activos.asp""" 7 | 8 | bban_format = "????####################" 9 | country_code = "AR" 10 | 11 | banks = ( 12 | "Banco de la Nación Argentina", 13 | "Banco Santander", 14 | "Banco de Galicia y Buenos Aires", 15 | "Banco de la Provincia de Buenos Aires", 16 | "BBVA Argentina", 17 | "Banco Macro", 18 | "HSBC Bank Argentina", 19 | "Banco Ciudad de Buenos Aires", 20 | "Banco Credicoop", 21 | "Industrial And Commercial Bank Of China", 22 | "Citibank", 23 | "Banco Patagonia", 24 | "Banco de la Provincia de Córdoba", 25 | "Banco Supervielle", 26 | "Nuevo Banco de Santa Fe", 27 | "Banco Hipotecario S. A.", 28 | "Banco Itaú Argentina", 29 | "Banco de Inversión y Comercio Exterior (BICE)", 30 | "Banco Comafi", 31 | "BSE - Banco Santiago del Estero", 32 | ) 33 | 34 | def bank(self) -> str: 35 | """Generate a bank name.""" 36 | return self.random_element(self.banks) 37 | -------------------------------------------------------------------------------- /faker/providers/bank/es_ES/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BankProvider 2 | 3 | 4 | class Provider(BankProvider): 5 | """Implement bank provider for ``es_ES`` locale.""" 6 | 7 | bban_format = "####################" 8 | country_code = "ES" 9 | -------------------------------------------------------------------------------- /faker/providers/bank/fi_FI/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BankProvider 2 | 3 | 4 | class Provider(BankProvider): 5 | """Implement bank provider for ``fi_FI`` locale.""" 6 | 7 | bban_format = "##############" 8 | country_code = "FI" 9 | -------------------------------------------------------------------------------- /faker/providers/bank/fil_PH/__init__.py: -------------------------------------------------------------------------------- 1 | from ..en_PH import Provider as EnPhBankProvider 2 | 3 | 4 | class Provider(EnPhBankProvider): 5 | """Implement bank provider for ``fil_PH`` locale. 6 | 7 | There is no difference from the ``en_PH`` implementation. 8 | """ 9 | 10 | pass 11 | -------------------------------------------------------------------------------- /faker/providers/bank/fr_CH/__init__.py: -------------------------------------------------------------------------------- 1 | from ..de_CH import Provider as DeChBankProvider 2 | 3 | 4 | class Provider(DeChBankProvider): 5 | """Implement bank provider for ``fr_CH`` locale. 6 | 7 | There is no difference from the ``de_CH`` implementation. 8 | """ 9 | 10 | pass 11 | -------------------------------------------------------------------------------- /faker/providers/bank/fr_FR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BankProvider 2 | 3 | 4 | class Provider(BankProvider): 5 | """Implement bank provider for ``fr_FR`` locale.""" 6 | 7 | bban_format = "#######################" 8 | country_code = "FR" 9 | -------------------------------------------------------------------------------- /faker/providers/bank/it_CH/__init__.py: -------------------------------------------------------------------------------- 1 | from ..de_CH import Provider as DeChBankProvider 2 | 3 | 4 | class Provider(DeChBankProvider): 5 | """Implement bank provider for ``it_CH`` locale. 6 | 7 | There is no difference from the ``de_CH`` implementation. 8 | """ 9 | 10 | pass 11 | -------------------------------------------------------------------------------- /faker/providers/bank/it_IT/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BankProvider 2 | 3 | 4 | class Provider(BankProvider): 5 | """Implement bank provider for ``it_IT`` locale.""" 6 | 7 | bban_format = "?######################" 8 | country_code = "IT" 9 | -------------------------------------------------------------------------------- /faker/providers/bank/nl_NL/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BankProvider 2 | 3 | 4 | class Provider(BankProvider): 5 | """Implement bank provider for ``nl_NL`` locale.""" 6 | 7 | bban_format = "????##########" 8 | country_code = "NL" 9 | -------------------------------------------------------------------------------- /faker/providers/bank/no_NO/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BankProvider 2 | 3 | 4 | class Provider(BankProvider): 5 | """Implement bank provider for ``no_NO`` locale.""" 6 | 7 | bban_format = "###########" 8 | country_code = "NO" 9 | -------------------------------------------------------------------------------- /faker/providers/bank/pl_PL/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BankProvider 2 | 3 | 4 | class Provider(BankProvider): 5 | """Implement bank provider for ``pl_PL`` locale.""" 6 | 7 | bban_format = "#" * 24 8 | country_code = "PL" 9 | -------------------------------------------------------------------------------- /faker/providers/bank/pt_PT/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BankProvider 2 | 3 | 4 | class Provider(BankProvider): 5 | """Implement bank provider for ``pt_PT`` locale.""" 6 | 7 | bban_format = "#####################" 8 | country_code = "PT" 9 | -------------------------------------------------------------------------------- /faker/providers/bank/ro_RO/__init__.py: -------------------------------------------------------------------------------- 1 | from faker.providers.bank import Provider as BankProvider 2 | 3 | 4 | class Provider(BankProvider): 5 | """Implement bank provider for ``ro_RO`` locale.""" 6 | 7 | country_code = "RO" 8 | bban_format = "????################" 9 | swift_bank_codes = ( 10 | "NBOR", 11 | "ABNA", 12 | "BUCU", 13 | "ARBL", 14 | "MIND", 15 | "BPOS", 16 | "CARP", 17 | "RNCB", 18 | "BROM", 19 | "BITR", 20 | "BRDE", 21 | "BRMA", 22 | "BTRL", 23 | "DAFB", 24 | "MIRB", 25 | "CECE", 26 | "CITI", 27 | "CRCO", 28 | "FNNB", 29 | "EGNA", 30 | "BSEA", 31 | "EXIM", 32 | "UGBI", 33 | "HVBL", 34 | "INGB", 35 | "BREL", 36 | "CRDZ", 37 | "BNRB", 38 | "PIRB", 39 | "PORL", 40 | "MIRO", 41 | "RZBL", 42 | "RZBR", 43 | "ROIN", 44 | "WBAN", 45 | "TRFD", 46 | "TREZ", 47 | "BACX", 48 | "VBBU", 49 | "DARO", 50 | ) 51 | -------------------------------------------------------------------------------- /faker/providers/bank/sk_SK/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BankProvider 2 | 3 | 4 | class Provider(BankProvider): 5 | """Implement bank provider for ``sk_SK`` locale. 6 | 7 | https://www.mbank.cz/informace-k-produktum/info/ucty/cislo-uctu-iban.html 8 | """ 9 | 10 | bban_format = "####################" 11 | country_code = "SK" 12 | -------------------------------------------------------------------------------- /faker/providers/bank/tl_PH/__init__.py: -------------------------------------------------------------------------------- 1 | from ..en_PH import Provider as EnPhBankProvider 2 | 3 | 4 | class Provider(EnPhBankProvider): 5 | """Implement bank provider for ``tl_PH`` locale. 6 | 7 | There is no difference from the ``en_PH`` implementation. 8 | """ 9 | 10 | pass 11 | -------------------------------------------------------------------------------- /faker/providers/bank/tr_TR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BankProvider 2 | 3 | 4 | class Provider(BankProvider): 5 | """Implement bank provider for ``tr_TR`` locale.""" 6 | 7 | bban_format = "######################" 8 | country_code = "TR" 9 | -------------------------------------------------------------------------------- /faker/providers/bank/zh_CN/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BankProvider 2 | 3 | 4 | class Provider(BankProvider): 5 | """Implement bank provider for ``zh_CN`` locale. 6 | Source: https://zh.wikipedia.org/wiki/中国大陆银行列表 7 | """ 8 | 9 | banks = ( 10 | "中国人民银行", 11 | "国家开发银行", 12 | "中国进出口银行", 13 | "中国农业发展银行", 14 | "交通银行", 15 | "中国银行", 16 | "中国建设银行", 17 | "中国农业银行", 18 | "中国工商银行", 19 | "中国邮政储蓄银行", 20 | "中国光大银行", 21 | "中国民生银行", 22 | "招商银行", 23 | "中信银行", 24 | "华夏银行", 25 | "上海浦东发展银行", 26 | "平安银行", 27 | "广发银行", 28 | "兴业银行", 29 | "浙商银行", 30 | "渤海银行", 31 | "恒丰银行", 32 | "西安银行", 33 | ) 34 | 35 | def bank(self) -> str: 36 | """Generate a bank name.""" 37 | return self.random_element(self.banks) 38 | -------------------------------------------------------------------------------- /faker/providers/barcode/en_CA/__init__.py: -------------------------------------------------------------------------------- 1 | from itertools import product 2 | 3 | from ..en_US import Provider as EnUsBarcodeProvider 4 | 5 | 6 | class Provider(EnUsBarcodeProvider): 7 | """Implement barcode provider for ``en_CA`` locale. 8 | 9 | Canada uses UPC as well, so there are similarities between this and the 10 | ``en_US`` implementation. 11 | 12 | Sources: 13 | 14 | - https://gs1.org/standards/id-keys/company-prefix 15 | - https://www.nationwidebarcode.com/upc-country-codes/ 16 | """ 17 | 18 | local_prefixes = ( 19 | # Some sources do not specify prefixes 00~01, 06~09 for use in Canada, 20 | # but it's referenced in other pages 21 | *product((0,), range(2)), 22 | *product((0,), range(6, 10)), 23 | (7, 5), 24 | ) 25 | -------------------------------------------------------------------------------- /faker/providers/barcode/es_ES/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BarcodeProvider 2 | 3 | 4 | class Provider(BarcodeProvider): 5 | """Implement barcode provider for ``es_ES`` locale. 6 | 7 | Sources: 8 | 9 | - https://gs1.org/standards/id-keys/company-prefix 10 | """ 11 | 12 | local_prefixes = ((8, 4),) 13 | -------------------------------------------------------------------------------- /faker/providers/barcode/fr_CA/__init__.py: -------------------------------------------------------------------------------- 1 | from ..en_CA import Provider as BarcodeProvider 2 | 3 | 4 | class Provider(BarcodeProvider): 5 | """Implement bank provider for ``fr_CA`` locale. 6 | 7 | There is no difference from the ``en_CA`` implementation. 8 | """ 9 | 10 | pass 11 | -------------------------------------------------------------------------------- /faker/providers/color/cs_CZ/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as ColorProvider 2 | 3 | 4 | class Provider(ColorProvider): 5 | """Implement color provider for ``cs_CZ`` locale.""" 6 | 7 | safe_colors = ( 8 | "černá", 9 | "kaštanová", 10 | "zelená", 11 | "námořnická", 12 | "olivová", 13 | "fialová", 14 | "zelenomodrá", 15 | "limetková", 16 | "modrá", 17 | "stříbrná", 18 | "šedá", 19 | "žlutá", 20 | "fuchsiová", 21 | "aquamarinová", 22 | "bílá", 23 | ) 24 | -------------------------------------------------------------------------------- /faker/providers/color/de_AT/__init__.py: -------------------------------------------------------------------------------- 1 | from ..de import Provider as BaseProvider 2 | 3 | 4 | class Provider(BaseProvider): 5 | pass 6 | -------------------------------------------------------------------------------- /faker/providers/color/de_CH/__init__.py: -------------------------------------------------------------------------------- 1 | from collections import OrderedDict 2 | 3 | from faker.typing import OrderedDictType 4 | 5 | from ..de import Provider as BaseProvider 6 | 7 | 8 | class Provider(BaseProvider): 9 | all_colors: OrderedDictType[str, str] = OrderedDict( 10 | (color_name.replace("ß", "ss"), color_hexcode) for color_name, color_hexcode in BaseProvider.all_colors.items() 11 | ) 12 | -------------------------------------------------------------------------------- /faker/providers/color/de_DE/__init__.py: -------------------------------------------------------------------------------- 1 | from ..de import Provider as BaseProvider 2 | 3 | 4 | class Provider(BaseProvider): 5 | pass 6 | -------------------------------------------------------------------------------- /faker/providers/color/en_US/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as ColorProvider 2 | 3 | 4 | class Provider(ColorProvider): 5 | """Implement color provider for ``en_US`` locale.""" 6 | 7 | pass 8 | -------------------------------------------------------------------------------- /faker/providers/color/es_CL/__init__.py: -------------------------------------------------------------------------------- 1 | from ..es import Provider as ColorProvider 2 | 3 | localized = True 4 | 5 | 6 | class Provider(ColorProvider): 7 | pass 8 | -------------------------------------------------------------------------------- /faker/providers/color/es_ES/__init__.py: -------------------------------------------------------------------------------- 1 | from ..es import Provider as ColorProvider 2 | 3 | localized = True 4 | 5 | 6 | class Provider(ColorProvider): 7 | pass 8 | -------------------------------------------------------------------------------- /faker/providers/color/hu_HU/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as ColorProvider 2 | 3 | 4 | class Provider(ColorProvider): 5 | """Implement color provider for ``hu_HU`` locale.""" 6 | 7 | safe_colors = ( 8 | "fekete", 9 | "bordó", 10 | "zöld", 11 | "királykék", 12 | "oliva", 13 | "bíbor", 14 | "kékeszöld", 15 | "citromzöld", 16 | "kék", 17 | "ezüst", 18 | "szürke", 19 | "sárga", 20 | "mályva", 21 | "akvamarin", 22 | "fehér", 23 | ) 24 | -------------------------------------------------------------------------------- /faker/providers/color/sk_SK/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as ColorProvider 2 | 3 | 4 | class Provider(ColorProvider): 5 | """Implement color provider for ``sk_SK`` locale.""" 6 | 7 | safe_colors = ( 8 | "čierna", 9 | "gaštanová", 10 | "zelená", 11 | "námornícka", 12 | "olivová", 13 | "fialová", 14 | "zelenomodrá", 15 | "limetková", 16 | "modrá", 17 | "strieborná", 18 | "sivá", 19 | "žltá", 20 | "fuchsiová", 21 | "aquamarinová", 22 | "biela", 23 | ) 24 | -------------------------------------------------------------------------------- /faker/providers/company/bg_BG/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CompanyProvider 2 | 3 | 4 | class Provider(CompanyProvider): 5 | formats = ( 6 | "{{last_name}} {{company_suffix}}", 7 | "{{last_name}} {{last_name}} {{company_suffix}}", 8 | "{{last_name}}", 9 | ) 10 | 11 | company_suffixes = ( 12 | "АД", 13 | "AD", 14 | "ADSITz", 15 | "АДСИЦ", 16 | "EAD", 17 | "ЕАД", 18 | "EOOD", 19 | "ЕООД", 20 | "ET", 21 | "ET", 22 | "OOD", 23 | "ООД", 24 | "KD", 25 | "КД", 26 | "KDA", 27 | "КДА", 28 | "SD", 29 | "СД", 30 | ) 31 | -------------------------------------------------------------------------------- /faker/providers/company/cs_CZ/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CompanyProvider 2 | 3 | 4 | class Provider(CompanyProvider): 5 | formats = ( 6 | "{{last_name}} {{company_suffix}}", 7 | "{{last_name}} {{last_name}} {{company_suffix}}", 8 | "{{last_name}}", 9 | ) 10 | 11 | # Company suffixes are from 12 | # https://cs.wikipedia.org/wiki/Obchodn%C3%AD_spole%C4%8Dnost 13 | company_suffixes = ( 14 | "s.r.o.", 15 | "o.s.", 16 | "a.s.", 17 | "v.o.s.", 18 | "k.s.", 19 | ) 20 | -------------------------------------------------------------------------------- /faker/providers/company/da_DK/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CompanyProvider 2 | 3 | 4 | class Provider(CompanyProvider): 5 | formats = ( 6 | "{{last_name}} {{company_suffix}}", 7 | "{{last_name}} & {{last_name}} {{company_suffix}}", 8 | "{{last_name}} & Søn {{company_suffix}}", 9 | ) 10 | 11 | company_suffixes = ( 12 | "A/S", 13 | "ApS", 14 | ) 15 | -------------------------------------------------------------------------------- /faker/providers/company/de_AT/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CompanyProvider 2 | 3 | 4 | class Provider(CompanyProvider): 5 | # Source: https://www.wko.at/wirtschaftsrecht/gesellschaftsformen-oesterreich 6 | 7 | formats = ( 8 | "{{last_name}} {{company_suffix}}", 9 | "{{last_name}} {{last_name}} {{company_suffix}}", 10 | "{{last_name}} & {{last_name}} {{company_suffix}}", 11 | ) 12 | 13 | company_suffixes = ( 14 | "AG", 15 | "AG", 16 | "AG", 17 | "GesbR", 18 | "GmbH", 19 | "GmbH", 20 | "GmbH", 21 | "KG", 22 | "KG", 23 | "KG", 24 | "OG", 25 | "e.V.", 26 | ) 27 | -------------------------------------------------------------------------------- /faker/providers/company/de_CH/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CompanyProvider 2 | 3 | 4 | class Provider(CompanyProvider): 5 | # Source: https://de.wikipedia.org/wiki/Firma#Schweizerisches_Recht 6 | 7 | formats = ( 8 | "{{last_name}} {{company_suffix}}", 9 | "{{last_name}} {{last_name}} {{company_suffix}}", 10 | ) 11 | 12 | company_suffixes = ( 13 | "AG", 14 | "AG", 15 | "AG", 16 | "GmbH", 17 | "GmbH", 18 | "GmbH", 19 | "& Co.", 20 | "& Partner", 21 | "& Cie.", 22 | "& Söhne", 23 | ) 24 | -------------------------------------------------------------------------------- /faker/providers/company/de_DE/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CompanyProvider 2 | 3 | 4 | class Provider(CompanyProvider): 5 | formats = ( 6 | "{{last_name}} {{company_suffix}}", 7 | "{{last_name}} {{last_name}} {{company_suffix}}", 8 | "{{last_name}}", 9 | ) 10 | 11 | company_suffixes = ( 12 | "AG", 13 | "AG", 14 | "AG", 15 | "AG", 16 | "AG & Co. KG", 17 | "AG & Co. KGaA", 18 | "AG & Co. OHG", 19 | "GbR", 20 | "GbR", 21 | "GmbH", 22 | "GmbH", 23 | "GmbH", 24 | "GmbH", 25 | "GmbH & Co. KG", 26 | "GmbH & Co. KG", 27 | "GmbH & Co. KGaA", 28 | "GmbH & Co. OHG", 29 | "KG", 30 | "KG", 31 | "KG", 32 | "KGaA", 33 | "OHG mbH", 34 | "Stiftung & Co. KG", 35 | "Stiftung & Co. KGaA", 36 | "e.G.", 37 | "e.V.", 38 | ) 39 | -------------------------------------------------------------------------------- /faker/providers/company/el_GR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CompanyProvider 2 | 3 | 4 | class Provider(CompanyProvider): 5 | formats = ( 6 | "{{last_name}} {{company_suffix}}", 7 | "{{last_name}}-{{last_name}}", 8 | "{{last_name}}-{{last_name}} {{company_suffix}}", 9 | "{{last_name}}, {{last_name}} και {{last_name}}", 10 | ) 11 | company_suffixes = ("Α.Ε.", "και υιοί", "Ο.Ε.", "Α.Β.Ε.Ε.", "Α.Ε. ΟΜΙΛΟΣ ΕΤΑΙΡΕΙΩΝ") 12 | -------------------------------------------------------------------------------- /faker/providers/company/en_US/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CompanyProvider 2 | 3 | 4 | class Provider(CompanyProvider): 5 | pass 6 | -------------------------------------------------------------------------------- /faker/providers/company/hr_HR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CompanyProvider 2 | 3 | 4 | class Provider(CompanyProvider): 5 | formats = ( 6 | "{{last_name}} {{company_suffix}}", 7 | "{{last_name}} {{last_name}} {{company_suffix}}", 8 | "{{last_name}}", 9 | ) 10 | 11 | company_suffixes = ( 12 | "d.o.o.", 13 | "d.d.", 14 | "j.d.o.o.", 15 | ) 16 | -------------------------------------------------------------------------------- /faker/providers/company/hu_HU/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CompanyProvider 2 | 3 | 4 | class Provider(CompanyProvider): 5 | formats = ( 6 | "{{last_name}} {{company_suffix}}", 7 | "{{last_name}} {{last_name}} {{company_suffix}}", 8 | "{{last_name}} és {{last_name}} {{company_suffix}}", 9 | "{{last_name}} és társa {{company_suffix}}", 10 | ) 11 | 12 | company_suffixes = ("Kft.", "Kht.", "Zrt.", "Bt.", "Nyrt.", "Kkt.") 13 | 14 | def company_suffix(self) -> str: 15 | return self.random_element(self.company_suffixes) 16 | -------------------------------------------------------------------------------- /faker/providers/company/id_ID/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CompanyProvider 2 | 3 | 4 | class Provider(CompanyProvider): 5 | formats = ( 6 | "{{company_prefix}} {{last_name}}", 7 | "{{company_prefix}} {{last_name}} {{last_name}}", 8 | "{{company_prefix}} {{last_name}} {{company_suffix}}", 9 | "{{company_prefix}} {{last_name}} {{last_name}} {{company_suffix}}", 10 | ) 11 | 12 | # From http://id.wikipedia.org/wiki/Jenis_badan_usaha 13 | # via 14 | # https://github.com/fzaninotto/faker/blob/master/src/Faker/Provider/id_ID/Company.php 15 | company_prefixes = ( 16 | "PT", 17 | "CV", 18 | "UD", 19 | "PD", 20 | "Perum", 21 | ) 22 | 23 | # From http://id.wikipedia.org/wiki/Jenis_badan_usaha 24 | # via 25 | # https://github.com/fzaninotto/faker/blob/master/src/Faker/Provider/id_ID/Company.php 26 | company_suffixes = ( 27 | "(Persero) Tbk", 28 | "Tbk", 29 | ) 30 | 31 | def company_prefix(self) -> str: 32 | return self.random_element(self.company_prefixes) 33 | -------------------------------------------------------------------------------- /faker/providers/company/ja_JP/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CompanyProvider 2 | 3 | 4 | class Provider(CompanyProvider): 5 | formats = ( 6 | "{{company_prefix}}{{last_name}}{{company_category}}", 7 | "{{last_name}}{{company_category}}{{company_prefix}}", 8 | ) 9 | 10 | company_prefixes = ("株式会社", "有限会社", "合同会社") 11 | company_categories = ( 12 | "水産", 13 | "農林", 14 | "鉱業", 15 | "建設", 16 | "食品", 17 | "印刷", 18 | "電気", 19 | "ガス", 20 | "情報", 21 | "通信", 22 | "運輸", 23 | "銀行", 24 | "保険", 25 | ) 26 | 27 | def company_prefix(self) -> str: 28 | return self.random_element(self.company_prefixes) 29 | 30 | def company_category(self) -> str: 31 | return self.random_element(self.company_categories) 32 | -------------------------------------------------------------------------------- /faker/providers/company/nl_BE/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CompanyProvider 2 | 3 | 4 | class Provider(CompanyProvider): 5 | formats = ( 6 | "{{last_name}} {{company_suffix}}", 7 | "{{last_name}}-{{last_name}} {{company_suffix}}", 8 | "{{last_name}}, {{last_name}} en {{last_name}} {{company_suffix}}", 9 | ) 10 | company_suffixes = ("NV", "BV", "CV", "VOF", "CommV") 11 | -------------------------------------------------------------------------------- /faker/providers/company/no_NO/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CompanyProvider 2 | 3 | 4 | class Provider(CompanyProvider): 5 | formats = [ 6 | "{{last_name}} {{company_suffix}}", 7 | "{{last_name}} {{company_suffix}}", 8 | "{{last_name}} {{company_suffix}}", 9 | "{{last_name}}-{{last_name}} {{company_suffix}}", 10 | "{{last_name}}, {{last_name}} og {{last_name}}", 11 | "{{last_name}}-{{last_name}}", 12 | ] 13 | 14 | company_suffixes = [ 15 | "Gruppen", 16 | "AS", 17 | "ASA", 18 | "BA", 19 | "RFH", 20 | "og Sønner", 21 | "& co.", 22 | ] 23 | -------------------------------------------------------------------------------- /faker/providers/company/ro_RO/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CompanyProvider 2 | 3 | 4 | class Provider(CompanyProvider): 5 | formats = ( 6 | "{{last_name}} {{company_suffix}}", 7 | "{{last_name}} {{last_name}} {{company_suffix}}", 8 | "{{last_name}}", 9 | ) 10 | company_prefixes = ("S.C.", "S.S.I.", "A.D.") 11 | company_suffixes = ( 12 | "SRL", 13 | "SA", 14 | "SCA", 15 | "SNC", 16 | "SCS", 17 | "AFJ", 18 | "ASF", 19 | "CON", 20 | "CRL", 21 | "INC", 22 | "LOC", 23 | "OC1", 24 | "OC2", 25 | "OC3", 26 | "PFA", 27 | "RA", 28 | "SCS", 29 | "SPI", 30 | "URL", 31 | ) 32 | 33 | def company_suffix(self) -> str: 34 | return self.random_element(self.company_suffixes) 35 | -------------------------------------------------------------------------------- /faker/providers/company/sk_SK/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CompanyProvider 2 | 3 | 4 | class Provider(CompanyProvider): 5 | formats = ( 6 | "{{last_name}} {{company_suffix}}", 7 | "{{last_name}} {{last_name}} {{company_suffix}}", 8 | "{{last_name}}", 9 | ) 10 | 11 | company_suffixes = ( 12 | "s.r.o.", 13 | "v.o.s.", 14 | "a.s.", 15 | "k.s.", 16 | ) 17 | -------------------------------------------------------------------------------- /faker/providers/company/sl_SI/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CompanyProvider 2 | 3 | 4 | class Provider(CompanyProvider): 5 | formats = ( 6 | "{{last_name}} {{company_suffix}}", 7 | "{{first_name}} {{last_name}} s.p.", 8 | ) 9 | 10 | company_suffixes = ( 11 | "d.o.o.", 12 | "d.d.", 13 | ) 14 | -------------------------------------------------------------------------------- /faker/providers/company/sv_SE/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CompanyProvider 2 | 3 | 4 | class Provider(CompanyProvider): 5 | formats = ( 6 | "{{last_name}} {{company_suffix}}", 7 | "{{last_name}} {{last_name}} {{company_suffix}}", 8 | "{{last_name}} & {{last_name}} {{company_suffix}}", 9 | ) 10 | 11 | company_suffixes = ( 12 | "AB", 13 | "HB", 14 | ) 15 | -------------------------------------------------------------------------------- /faker/providers/company/tl_PH/__init__.py: -------------------------------------------------------------------------------- 1 | from ..fil_PH import Provider as FilPhProvider 2 | 3 | 4 | class Provider(FilPhProvider): 5 | """No difference from Company Provider for fil_PH locale""" 6 | 7 | pass 8 | -------------------------------------------------------------------------------- /faker/providers/company/vi_VN/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CompanyProvider 2 | 3 | 4 | class Provider(CompanyProvider): 5 | # Source: https://vi.wikipedia.org/wiki/Danh_s%C3%A1ch_c%C3%B4ng_ty_Vi%E1%BB%87t_Nam 6 | formats = ( 7 | "{{last_name}} {{company_suffix}}", 8 | "{{last_name}} {{last_name}} {{company_suffix}}", 9 | "{{last_name}} và {{last_name}} {{company_suffix}}", 10 | "{{last_name}} và đối tác {{company_suffix}}", 11 | ) 12 | 13 | company_suffixes = ( 14 | "Công ty TNHH", 15 | "Công ty Cổ phần", 16 | "Doanh nghiệp tư nhân", 17 | "Công ty TNHH MTV", 18 | "Công ty Hợp danh", 19 | "Công ty Trách nhiệm hữu hạn", 20 | "Tập Đoàn", 21 | ) 22 | 23 | def company_suffix(self) -> str: 24 | return self.random_element(self.company_suffixes) 25 | -------------------------------------------------------------------------------- /faker/providers/credit_card/en_US/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CreditCardProvider 2 | 3 | 4 | class Provider(CreditCardProvider): 5 | """Implement credit card provider for ``en_US`` locale.""" 6 | 7 | pass 8 | -------------------------------------------------------------------------------- /faker/providers/currency/cs_CZ/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CurrencyProvider 2 | 3 | 4 | class Provider(CurrencyProvider): 5 | price_formats = ["#,#0", "%#,#0", "%##,#0", "%.###,#0", "%#.###,#0"] 6 | 7 | def pricetag(self) -> str: 8 | return self.numerify(self.random_element(self.price_formats)) + "\N{NO-BREAK SPACE}Kč" 9 | -------------------------------------------------------------------------------- /faker/providers/currency/da_DK/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CurrencyProvider 2 | 3 | 4 | class Provider(CurrencyProvider): 5 | price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"] 6 | 7 | def pricetag(self): 8 | return self.numerify(self.random_element(self.price_formats)) + " kr." 9 | -------------------------------------------------------------------------------- /faker/providers/currency/de_AT/__init__.py: -------------------------------------------------------------------------------- 1 | from ..de import Provider as CurrencyProvider 2 | 3 | 4 | class Provider(CurrencyProvider): 5 | price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"] 6 | 7 | def pricetag(self) -> str: 8 | return self.numerify(self.random_element(self.price_formats)) + "\N{NO-BREAK SPACE}\N{EURO SIGN}" 9 | -------------------------------------------------------------------------------- /faker/providers/currency/de_CH/__init__.py: -------------------------------------------------------------------------------- 1 | from ..de import Provider as CurrencyProvider 2 | 3 | 4 | class Provider(CurrencyProvider): 5 | # source: https://de.wikipedia.org/wiki/Schreibweise_von_Zahlen#Dezimaltrennzeichen_2 6 | price_formats = ["\N{FIGURE DASH}.##", "%.##", "%#.##", "%##.##", "% ###.##", "%# ###.##"] 7 | 8 | def pricetag(self): 9 | return "Fr.\N{NO-BREAK SPACE}" + self.numerify(self.random_element(self.price_formats)) 10 | -------------------------------------------------------------------------------- /faker/providers/currency/de_DE/__init__.py: -------------------------------------------------------------------------------- 1 | from ..de import Provider as CurrencyProvider 2 | 3 | 4 | class Provider(CurrencyProvider): 5 | price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"] 6 | 7 | def pricetag(self): 8 | return self.numerify(self.random_element(self.price_formats)) + "\N{NO-BREAK SPACE}\N{EURO SIGN}" 9 | -------------------------------------------------------------------------------- /faker/providers/currency/en_AU/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CurrencyProvider 2 | 3 | 4 | class Provider(CurrencyProvider): 5 | price_formats = ["#.##", "%#.##", "%##.##", "%,###.##", "%#,###.##"] 6 | 7 | def pricetag(self) -> str: 8 | return "$\N{NO-BREAK SPACE}" + self.numerify(self.random_element(self.price_formats)) 9 | -------------------------------------------------------------------------------- /faker/providers/currency/en_CA/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CurrencyProvider 2 | 3 | 4 | class Provider(CurrencyProvider): 5 | price_formats = ["#.##", "%#.##", "%##.##", "%,###.##", "%#,###.##"] 6 | 7 | def pricetag(self): 8 | return "$\N{NO-BREAK SPACE}" + self.numerify(self.random_element(self.price_formats)) 9 | -------------------------------------------------------------------------------- /faker/providers/currency/en_US/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CurrencyProvider 2 | 3 | 4 | class Provider(CurrencyProvider): 5 | price_formats = ["#.##", "%#.##", "%##.##", "%,###.##", "%#,###.##"] 6 | 7 | def pricetag(self) -> str: 8 | return "$" + self.numerify(self.random_element(self.price_formats)) 9 | -------------------------------------------------------------------------------- /faker/providers/currency/es_AR/__init__.py: -------------------------------------------------------------------------------- 1 | from ..es import Provider as CurrencyProvider 2 | 3 | 4 | class Provider(CurrencyProvider): 5 | price_formats = ["%##", "%.###", "%#.##0", "%##.##0", "%##.##0", "%.###.##0", "%#,##"] 6 | 7 | def pricetag(self) -> str: 8 | return "$" + self.numerify(self.random_element(self.price_formats)) 9 | -------------------------------------------------------------------------------- /faker/providers/currency/es_CL/__init__.py: -------------------------------------------------------------------------------- 1 | from ..es import Provider as CurrencyProvider 2 | 3 | 4 | class Provider(CurrencyProvider): 5 | price_formats = ["%##", "%.###", "%#.##0", "%##.##0", "%##.##0", "%.###.##0"] 6 | 7 | def pricetag(self) -> str: 8 | return "\N{DOLLAR SIGN}\N{NO-BREAK SPACE}" + self.numerify(self.random_element(self.price_formats)) 9 | -------------------------------------------------------------------------------- /faker/providers/currency/es_ES/__init__.py: -------------------------------------------------------------------------------- 1 | from ..es import Provider as CurrencyProvider 2 | 3 | 4 | class Provider(CurrencyProvider): 5 | price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"] 6 | 7 | def pricetag(self) -> str: 8 | return self.numerify(self.random_element(self.price_formats)) + "\N{NO-BREAK SPACE}\N{EURO SIGN}" 9 | -------------------------------------------------------------------------------- /faker/providers/currency/fa_IR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CurrencyProvider 2 | 3 | 4 | class Provider(CurrencyProvider): 5 | price_formats = ["###,###,000", "#,###,000,000", "%,###,###,###,###", "%,###,###,###,000,000"] 6 | 7 | def pricetag(self) -> str: 8 | return self.numerify(self.random_element(self.price_formats)) + "\ufdfc" 9 | -------------------------------------------------------------------------------- /faker/providers/currency/fr_CA/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CurrencyProvider 2 | 3 | 4 | class Provider(CurrencyProvider): 5 | price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"] 6 | 7 | def pricetag(self) -> str: 8 | return self.numerify(self.random_element(self.price_formats)) + "\N{NO-BREAK SPACE}$" 9 | -------------------------------------------------------------------------------- /faker/providers/currency/fr_FR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CurrencyProvider 2 | 3 | 4 | class Provider(CurrencyProvider): 5 | price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"] 6 | 7 | def pricetag(self): 8 | return self.numerify(self.random_element(self.price_formats)) + "\N{NO-BREAK SPACE}\N{EURO SIGN}" 9 | -------------------------------------------------------------------------------- /faker/providers/currency/it_IT/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CurrencyProvider 2 | 3 | 4 | class Provider(CurrencyProvider): 5 | price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"] 6 | 7 | def pricetag(self): 8 | return self.numerify(self.random_element(self.price_formats)) + "\N{NO-BREAK SPACE}\N{EURO SIGN}" 9 | -------------------------------------------------------------------------------- /faker/providers/currency/ng_NG/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CurrencyProvider 2 | 3 | 4 | class Provider(CurrencyProvider): 5 | price_formats = ["#.##", "%#.##", "%##.##", "%,###.##"] 6 | 7 | def pricetag(self) -> str: 8 | return "\N{NAIRA SIGN}" + "\N{NO-BREAK SPACE}" + self.numerify(self.random_element(self.price_formats)) 9 | -------------------------------------------------------------------------------- /faker/providers/currency/nl_NL/__init__.py: -------------------------------------------------------------------------------- 1 | from faker.providers.currency import Provider as CurrencyProvider 2 | 3 | 4 | class Provider(CurrencyProvider): 5 | price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"] 6 | 7 | def pricetag(self) -> str: 8 | return "\N{EURO SIGN}" + self.numerify(self.random_element(self.price_formats)) 9 | -------------------------------------------------------------------------------- /faker/providers/currency/pl_PL/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CurrencyProvider 2 | 3 | 4 | class Provider(CurrencyProvider): 5 | price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"] 6 | 7 | def pricetag(self) -> str: 8 | return self.numerify(self.random_element(self.price_formats)) + "\N{NO-BREAK SPACE}zł" 9 | -------------------------------------------------------------------------------- /faker/providers/currency/pt_BR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CurrencyProvider 2 | 3 | 4 | class Provider(CurrencyProvider): 5 | price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"] 6 | 7 | def pricetag(self) -> str: 8 | return "R$" + self.numerify(self.random_element(self.price_formats)) 9 | -------------------------------------------------------------------------------- /faker/providers/currency/ro_RO/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CurrencyProvider 2 | 3 | 4 | class Provider(CurrencyProvider): 5 | price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"] 6 | 7 | def pricetag(self) -> str: 8 | return self.numerify(self.random_element(self.price_formats)) + "\N{NO-BREAK SPACE}Lei" 9 | -------------------------------------------------------------------------------- /faker/providers/currency/sk_SK/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CurrencyProvider 2 | 3 | 4 | class Provider(CurrencyProvider): 5 | price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"] 6 | 7 | def pricetag(self): 8 | return self.numerify(self.random_element(self.price_formats)) + "\N{NO-BREAK SPACE}\N{EURO SIGN}" 9 | -------------------------------------------------------------------------------- /faker/providers/currency/tr_TR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CurrencyProvider 2 | 3 | 4 | class Provider(CurrencyProvider): 5 | price_formats = ["#.##", "%#.##", "%##.##", "%,###.##", "%#,###.##"] 6 | 7 | def pricetag(self) -> str: 8 | return f"{self.numerify(self.random_element(self.price_formats))} ₺" 9 | -------------------------------------------------------------------------------- /faker/providers/currency/vi_VN/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as CurrencyProvider 2 | 3 | 4 | class Provider(CurrencyProvider): 5 | # Source: https://vi.wikipedia.org/wiki/%C4%90%E1%BB%93ng_(%C4%91%C6%A1n_v%E1%BB%8B_ti%E1%BB%81n_t%E1%BB%87)#Ti%E1%BB%81n_gi%E1%BA%A5y_-_Ti%E1%BB%81n_polymer # NOQA 6 | price_formats = ["#.##", "%#.##", "%##.##", "%,###.##", "%#,###.##"] 7 | 8 | def pricetag(self) -> str: 9 | return "₫" + self.numerify(self.random_element(self.price_formats)) 10 | -------------------------------------------------------------------------------- /faker/providers/date_time/ar_EG/__init__.py: -------------------------------------------------------------------------------- 1 | from ..ar_AA import Provider as ArabicDateTimeProvider 2 | 3 | 4 | class Provider(ArabicDateTimeProvider): 5 | MONTH_NAMES = { 6 | "01": "يناير", 7 | "02": "فبراير", 8 | "03": "مارس", 9 | "04": "أبريل", 10 | "05": "مايو", 11 | "06": "يونيو", 12 | "07": "يوليو", 13 | "08": "أغسطس", 14 | "09": "سبتمبر", 15 | "10": "أكتوبر", 16 | "11": "نوفمبر", 17 | "12": "ديسمبر", 18 | } 19 | -------------------------------------------------------------------------------- /faker/providers/date_time/az_AZ/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | DAY_NAMES = { 6 | "0": "Bazar", 7 | "1": "Bazar ertəsi", 8 | "2": "Çərşənbə axşamı", 9 | "3": "Çərşənbə", 10 | "4": "Cümə axşamı", 11 | "5": "Cümə", 12 | "6": "Şənbə", 13 | } 14 | 15 | MONTH_NAMES = { 16 | "01": "Yanvar", 17 | "02": "Fevral", 18 | "03": "Mart", 19 | "04": "Aprel", 20 | "05": "May", 21 | "06": "İyun", 22 | "07": "İyul", 23 | "08": "Avqust", 24 | "09": "Sentyabr", 25 | "10": "Oktyabr", 26 | "11": "Noyabr", 27 | "12": "Dekabr", 28 | } 29 | 30 | def day_of_week(self): 31 | day = self.date("%w") 32 | return self.DAY_NAMES[day] 33 | 34 | def month_name(self): 35 | month = self.month() 36 | return self.MONTH_NAMES[month] 37 | -------------------------------------------------------------------------------- /faker/providers/date_time/cs_CZ/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | DAY_NAMES = { 6 | "0": "neděle", 7 | "1": "pondělí", 8 | "2": "úterý", 9 | "3": "středa", 10 | "4": "čtvrtek", 11 | "5": "pátek", 12 | "6": "sobota", 13 | } 14 | 15 | MONTH_NAMES = { 16 | "01": "leden", 17 | "02": "únor", 18 | "03": "březen", 19 | "04": "duben", 20 | "05": "květen", 21 | "06": "červen", 22 | "07": "červenec", 23 | "08": "srpen", 24 | "09": "září", 25 | "10": "říjen", 26 | "11": "listopad", 27 | "12": "prosinec", 28 | } 29 | 30 | def day_of_week(self): 31 | day = self.date("%w") 32 | return self.DAY_NAMES[day] 33 | 34 | def month_name(self): 35 | month = self.month() 36 | return self.MONTH_NAMES[month] 37 | -------------------------------------------------------------------------------- /faker/providers/date_time/da_DK/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | DAY_NAMES = { 6 | "0": "mandag", 7 | "1": "tirsdag", 8 | "2": "onsdag", 9 | "3": "torsdag", 10 | "4": "fredag", 11 | "5": "lørdag", 12 | "6": "søndag", 13 | } 14 | 15 | MONTH_NAMES = { 16 | "01": "januar", 17 | "02": "februar", 18 | "03": "marts", 19 | "04": "april", 20 | "05": "maj", 21 | "06": "juni", 22 | "07": "juli", 23 | "08": "august", 24 | "09": "september", 25 | "10": "oktober", 26 | "11": "november", 27 | "12": "decembder", 28 | } 29 | 30 | def day_of_week(self): 31 | day = self.date("%w") 32 | return self.DAY_NAMES[day] 33 | 34 | def month_name(self): 35 | month = self.month() 36 | return self.MONTH_NAMES[month] 37 | -------------------------------------------------------------------------------- /faker/providers/date_time/de_AT/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | DAY_NAMES = { 6 | "0": "Sonntag", 7 | "1": "Montag", 8 | "2": "Dienstag", 9 | "3": "Mittwoch", 10 | "4": "Donnerstag", 11 | "5": "Freitag", 12 | "6": "Samstag", 13 | } 14 | 15 | MONTH_NAMES = { 16 | "01": "Jänner", 17 | "02": "Februar", 18 | "03": "März", 19 | "04": "April", 20 | "05": "Mai", 21 | "06": "Juni", 22 | "07": "Juli", 23 | "08": "August", 24 | "09": "September", 25 | "10": "Oktober", 26 | "11": "November", 27 | "12": "Dezember", 28 | } 29 | 30 | def day_of_week(self): 31 | day = self.date("%w") 32 | return self.DAY_NAMES[day] 33 | 34 | def month_name(self): 35 | month = self.month() 36 | return self.MONTH_NAMES[month] 37 | -------------------------------------------------------------------------------- /faker/providers/date_time/de_DE/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | DAY_NAMES = { 6 | "0": "Sonntag", 7 | "1": "Montag", 8 | "2": "Dienstag", 9 | "3": "Mittwoch", 10 | "4": "Donnerstag", 11 | "5": "Freitag", 12 | "6": "Samstag", 13 | } 14 | 15 | MONTH_NAMES = { 16 | "01": "Januar", 17 | "02": "Februar", 18 | "03": "März", 19 | "04": "April", 20 | "05": "Mai", 21 | "06": "Juni", 22 | "07": "Juli", 23 | "08": "August", 24 | "09": "September", 25 | "10": "Oktober", 26 | "11": "November", 27 | "12": "Dezember", 28 | } 29 | 30 | def day_of_week(self): 31 | day = self.date("%w") 32 | return self.DAY_NAMES[day] 33 | 34 | def month_name(self): 35 | month = self.month() 36 | return self.MONTH_NAMES[month] 37 | -------------------------------------------------------------------------------- /faker/providers/date_time/el_GR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | DAY_NAMES = { 6 | "0": "Κυριακή", 7 | "1": "Δευτέρα", 8 | "2": "Τρίτη", 9 | "3": "Τετάρτη", 10 | "4": "Πέμπτη", 11 | "5": "Παρασκευή", 12 | "6": "Σάββατο", 13 | } 14 | 15 | MONTH_NAMES = { 16 | "01": "Ιανουάριος", 17 | "02": "Φεβρουάριος", 18 | "03": "Μάρτιος", 19 | "04": "Απρίλιος", 20 | "05": "Μάιος", 21 | "06": "Ιούνιος", 22 | "07": "Ιούλιος", 23 | "08": "Αύγουστος", 24 | "09": "Σεπτέμβριος", 25 | "10": "Οκτώβριος", 26 | "11": "Νοέμβριος", 27 | "12": "Δεκέμβριος", 28 | } 29 | 30 | def day_of_week(self): 31 | day = self.date("%w") 32 | return self.DAY_NAMES[day] 33 | 34 | def month_name(self): 35 | month = self.month() 36 | return self.MONTH_NAMES[month] 37 | -------------------------------------------------------------------------------- /faker/providers/date_time/en_PH/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | """No difference from default DateTimeProvider""" 6 | 7 | pass 8 | -------------------------------------------------------------------------------- /faker/providers/date_time/en_US/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | pass 6 | -------------------------------------------------------------------------------- /faker/providers/date_time/es/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | DAY_NAMES = { 6 | "0": "domingo", 7 | "1": "lunes", 8 | "2": "martes", 9 | "3": "miércoles", 10 | "4": "jueves", 11 | "5": "viernes", 12 | "6": "sábado", 13 | } 14 | 15 | MONTH_NAMES = { 16 | "01": "enero", 17 | "02": "febrero", 18 | "03": "marzo", 19 | "04": "abril", 20 | "05": "mayo", 21 | "06": "junio", 22 | "07": "julio", 23 | "08": "agosto", 24 | "09": "septiembre", 25 | "10": "octubre", 26 | "11": "noviembre", 27 | "12": "diciembre", 28 | } 29 | 30 | def day_of_week(self): 31 | day = self.date("%w") 32 | return self.DAY_NAMES[day] 33 | 34 | def month_name(self): 35 | month = self.month() 36 | return self.MONTH_NAMES[month] 37 | -------------------------------------------------------------------------------- /faker/providers/date_time/es_AR/__init__.py: -------------------------------------------------------------------------------- 1 | from ..es import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | pass 6 | -------------------------------------------------------------------------------- /faker/providers/date_time/es_CL/__init__.py: -------------------------------------------------------------------------------- 1 | from ..es import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | pass 6 | -------------------------------------------------------------------------------- /faker/providers/date_time/es_ES/__init__.py: -------------------------------------------------------------------------------- 1 | from ..es import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | pass 6 | -------------------------------------------------------------------------------- /faker/providers/date_time/fil_PH/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | """Provider for datetimes for fil_PH locale""" 6 | 7 | DAY_NAMES = { 8 | "0": "Linggo", 9 | "1": "Lunes", 10 | "2": "Martes", 11 | "3": "Miyerkules", 12 | "4": "Huwebes", 13 | "5": "Biyernes", 14 | "6": "Sabado", 15 | } 16 | MONTH_NAMES = { 17 | "01": "Enero", 18 | "02": "Pebrero", 19 | "03": "Marso", 20 | "04": "Abril", 21 | "05": "Mayo", 22 | "06": "Hunyo", 23 | "07": "Hulyo", 24 | "08": "Agosto", 25 | "09": "Setyembre", 26 | "10": "Oktubre", 27 | "11": "Nobyembre", 28 | "12": "Disyembre", 29 | } 30 | 31 | def day_of_week(self): 32 | day = self.date("%w") 33 | return self.DAY_NAMES[day] 34 | 35 | def month_name(self): 36 | month = self.month() 37 | return self.MONTH_NAMES[month] 38 | -------------------------------------------------------------------------------- /faker/providers/date_time/fr_CA/__init__.py: -------------------------------------------------------------------------------- 1 | from typing import Any 2 | 3 | from ..fr_FR import Provider as FRFRProvider 4 | 5 | 6 | class Provider(FRFRProvider): 7 | def __init__(self, *args: Any, **kwargs: Any) -> None: 8 | super().__init__(*args, **kwargs) 9 | -------------------------------------------------------------------------------- /faker/providers/date_time/fr_FR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | DAY_NAMES = { 6 | "0": "dimanche", 7 | "1": "lundi", 8 | "2": "mardi", 9 | "3": "mercredi", 10 | "4": "jeudi", 11 | "5": "vendredi", 12 | "6": "samedi", 13 | } 14 | MONTH_NAMES = { 15 | "01": "Janvier", 16 | "02": "Février", 17 | "03": "Mars", 18 | "04": "Avril", 19 | "05": "Mai", 20 | "06": "Juin", 21 | "07": "Juillet", 22 | "08": "Août", 23 | "09": "Septembre", 24 | "10": "Octobre", 25 | "11": "Novembre", 26 | "12": "Décembre", 27 | } 28 | 29 | def day_of_week(self) -> str: 30 | day = self.date("%w") 31 | return self.DAY_NAMES[day] 32 | 33 | def month_name(self) -> str: 34 | month = self.month() 35 | return self.MONTH_NAMES[month] 36 | -------------------------------------------------------------------------------- /faker/providers/date_time/hi_IN/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | def day_of_week(self) -> str: 6 | day = self.date("%w") 7 | DAY_NAMES = { 8 | "0": "सोमवार", 9 | "1": "मंगलवार", 10 | "2": "बुधवार", 11 | "3": "गुरुवार", 12 | "4": "जुम्मा", 13 | "5": "शनिवार", 14 | "6": "रविवार", 15 | } 16 | 17 | return DAY_NAMES[day] 18 | 19 | def month_name(self) -> str: 20 | month = self.month() 21 | MONTH_NAMES = { 22 | "01": "जनवरी", 23 | "02": "फ़रवरी", 24 | "03": "मार्च", 25 | "04": "अप्रैल", 26 | "05": "मई", 27 | "06": "जून", 28 | "07": "जुलाई", 29 | "08": "अगस्त", 30 | "09": "सितंबर", 31 | "10": "अक्टूबर", 32 | "11": "नवंबर", 33 | "12": "दिसंबर", 34 | } 35 | 36 | return MONTH_NAMES[month] 37 | -------------------------------------------------------------------------------- /faker/providers/date_time/hr_HR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | def day_of_week(self) -> str: 6 | day = self.date("%w") 7 | DAY_NAMES = { 8 | "0": "Nedjelja", 9 | "1": "Ponedjeljak", 10 | "2": "Utorak", 11 | "3": "Srijeda", 12 | "4": "Četvrtak", 13 | "5": "Petak", 14 | "6": "Subota", 15 | } 16 | return DAY_NAMES[day] 17 | 18 | def month_name(self) -> str: 19 | month = self.month() 20 | MONTH_NAMES = { 21 | "01": "Siječanj", 22 | "02": "Veljača", 23 | "03": "Ožujak", 24 | "04": "Travanj", 25 | "05": "Svibanj", 26 | "06": "Lipanj", 27 | "07": "Srpanj", 28 | "08": "Kolovoz", 29 | "09": "Rujan", 30 | "10": "Listopad", 31 | "11": "Studeni", 32 | "12": "Prosinac", 33 | } 34 | return MONTH_NAMES[month] 35 | -------------------------------------------------------------------------------- /faker/providers/date_time/hu_HU/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | def day_of_week(self) -> str: 6 | day = self.date("%w") 7 | DAY_NAMES = { 8 | "0": "hétfő", 9 | "1": "kedd", 10 | "2": "szerda", 11 | "3": "csütörtök", 12 | "4": "péntek", 13 | "5": "szombat", 14 | "6": "vasárnap", 15 | } 16 | 17 | return DAY_NAMES[day] 18 | 19 | def month_name(self) -> str: 20 | month = self.month() 21 | MONTH_NAMES = { 22 | "01": "január", 23 | "02": "február", 24 | "03": "március", 25 | "04": "április", 26 | "05": "május", 27 | "06": "junius", 28 | "07": "julius", 29 | "08": "augusztus", 30 | "09": "szeptember", 31 | "10": "október", 32 | "11": "november", 33 | "12": "december", 34 | } 35 | 36 | return MONTH_NAMES[month] 37 | -------------------------------------------------------------------------------- /faker/providers/date_time/hy_AM/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | DAY_NAMES = { 6 | "0": "Կիրակի", 7 | "1": "Երկուշաբթի", 8 | "2": "Երեքշաբթի", 9 | "3": "Չորեքշաբթի", 10 | "4": "Հինգշաբթի", 11 | "5": "Ուրբաթ", 12 | "6": "Շաբաթ", 13 | } 14 | 15 | MONTH_NAMES = { 16 | "01": "Հունվար", 17 | "02": "Փետրվար", 18 | "03": "Մարտ", 19 | "04": "Ապրիլ", 20 | "05": "Մայիս", 21 | "06": "Հունիս", 22 | "07": "Հուլիս", 23 | "08": "Օգոստոս", 24 | "09": "Սեպտեմբեր", 25 | "10": "Հոկտեմբեր", 26 | "11": "Նոյեմբեր", 27 | "12": "Դեկտեմբեր", 28 | } 29 | 30 | def day_of_week(self): 31 | day = self.date("%w") 32 | return self.DAY_NAMES[day] 33 | 34 | def month_name(self): 35 | month = self.month() 36 | return self.MONTH_NAMES[month] 37 | -------------------------------------------------------------------------------- /faker/providers/date_time/id_ID/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | def day_of_week(self) -> str: 6 | day = self.date("%w") 7 | DAY_NAMES = { 8 | "0": "Senin", 9 | "1": "Selasa", 10 | "2": "Rabu", 11 | "3": "Kamis", 12 | "4": "Jumat", 13 | "5": "Sabtu", 14 | "6": "Minggu", 15 | } 16 | 17 | return DAY_NAMES[day] 18 | 19 | def month_name(self) -> str: 20 | month = self.month() 21 | MONTH_NAMES = { 22 | "01": "Januari", 23 | "02": "Februari", 24 | "03": "Maret", 25 | "04": "April", 26 | "05": "Mei", 27 | "06": "Juni", 28 | "07": "Juli", 29 | "08": "Agustus", 30 | "09": "September", 31 | "10": "Oktober", 32 | "11": "November", 33 | "12": "Desember", 34 | } 35 | 36 | return MONTH_NAMES[month] 37 | -------------------------------------------------------------------------------- /faker/providers/date_time/it_IT/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | DAY_NAMES = { 6 | "0": "domenica", 7 | "1": "lunedì", 8 | "2": "martedì", 9 | "3": "mercoledì", 10 | "4": "giovedì", 11 | "5": "venerdì", 12 | "6": "sabato", 13 | } 14 | 15 | MONTH_NAMES = { 16 | "01": "gennaio", 17 | "02": "febbraio", 18 | "03": "marzo", 19 | "04": "aprile", 20 | "05": "maggio", 21 | "06": "giugno", 22 | "07": "luglio", 23 | "08": "agosto", 24 | "09": "settembre", 25 | "10": "ottobre", 26 | "11": "novembre", 27 | "12": "dicembre", 28 | } 29 | 30 | def day_of_week(self): 31 | day = self.date("%w") 32 | return self.DAY_NAMES[day] 33 | 34 | def month_name(self): 35 | month = self.month() 36 | return self.MONTH_NAMES[month] 37 | -------------------------------------------------------------------------------- /faker/providers/date_time/ka_GE/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | # Sourse: https://www.ganmarteba.ge/ 6 | DAY_NAMES = { 7 | "0": "კვირა", 8 | "1": "ორშაბათი", 9 | "2": "სამშაბათი", 10 | "3": "ოთხშაბათი", 11 | "4": "ხუთშაბათი", 12 | "5": "პარასკევი", 13 | "6": "შაბათი", 14 | } 15 | 16 | MONTH_NAMES = { 17 | "01": "იანვარი", 18 | "02": "თებერვალი", 19 | "03": "მარტი", 20 | "04": "აპრილი", 21 | "05": "მაისი", 22 | "06": "ივნისი", 23 | "07": "ივლისი", 24 | "08": "აგვისტო", 25 | "09": "სექტემბერი", 26 | "10": "ოქტომბერი", 27 | "11": "ნოემბერი", 28 | "12": "დეკემბერი", 29 | } 30 | 31 | def day_of_week(self): 32 | day = self.date("%w") 33 | return self.DAY_NAMES[day] 34 | 35 | def month_name(self): 36 | month = self.month() 37 | return self.MONTH_NAMES[month] 38 | -------------------------------------------------------------------------------- /faker/providers/date_time/ko_KR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | def day_of_week(self) -> str: 6 | day = self.date("%w") 7 | DAY_NAMES = { 8 | "0": "일요일", 9 | "1": "월요일", 10 | "2": "화요일", 11 | "3": "수요일", 12 | "4": "목요일", 13 | "5": "금요일", 14 | "6": "토요일", 15 | } 16 | return DAY_NAMES[day] 17 | 18 | def month_name(self) -> str: 19 | month = self.month() 20 | MONTH_NAMES = { 21 | "01": "1월", 22 | "02": "2월", 23 | "03": "3월", 24 | "04": "4월", 25 | "05": "5월", 26 | "06": "6월", 27 | "07": "7월", 28 | "08": "8월", 29 | "09": "9월", 30 | "10": "10월", 31 | "11": "11월", 32 | "12": "12월", 33 | } 34 | return MONTH_NAMES[month] 35 | -------------------------------------------------------------------------------- /faker/providers/date_time/nl_NL/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | DAY_NAMES = { 6 | "0": "zondag", 7 | "1": "maandag", 8 | "2": "dinsdag", 9 | "3": "woensdag", 10 | "4": "donderdag", 11 | "5": "vrijdag", 12 | "6": "zaterdag", 13 | } 14 | 15 | MONTH_NAMES = { 16 | "01": "januari", 17 | "02": "februari", 18 | "03": "maart", 19 | "04": "april", 20 | "05": "mei", 21 | "06": "juni", 22 | "07": "juli", 23 | "08": "augustus", 24 | "09": "september", 25 | "10": "oktober", 26 | "11": "november", 27 | "12": "december", 28 | } 29 | 30 | def day_of_week(self): 31 | day = self.date("%w") 32 | return self.DAY_NAMES[day] 33 | 34 | def month_name(self): 35 | month = self.month() 36 | return self.MONTH_NAMES[month] 37 | -------------------------------------------------------------------------------- /faker/providers/date_time/no_NO/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | MONTH_NAMES = { 6 | "01": "januar", 7 | "02": "februar", 8 | "03": "mars", 9 | "04": "april", 10 | "05": "mai", 11 | "06": "juni", 12 | "07": "juli", 13 | "08": "august", 14 | "09": "september", 15 | "10": "oktober", 16 | "11": "november", 17 | "12": "desember", 18 | } 19 | DAY_NAMES = { 20 | "0": "søndag", 21 | "1": "mandag", 22 | "2": "tirsdag", 23 | "3": "onsdag", 24 | "4": "torsdag", 25 | "5": "fredag", 26 | "6": "lørdag", 27 | } 28 | 29 | def day_of_week(self) -> str: 30 | day = self.date("%w") 31 | return self.DAY_NAMES[day] 32 | 33 | def month_name(self) -> str: 34 | month = self.month() 35 | return self.MONTH_NAMES[month] 36 | -------------------------------------------------------------------------------- /faker/providers/date_time/pl_PL/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | DAY_NAMES = { 6 | "0": "poniedziałek", 7 | "1": "wtorek", 8 | "2": "środa", 9 | "3": "czwartek", 10 | "4": "piątek", 11 | "5": "sobota", 12 | "6": "niedziela", 13 | } 14 | 15 | MONTH_NAMES = { 16 | "01": "styczeń", 17 | "02": "luty", 18 | "03": "marzec", 19 | "04": "kwiecień", 20 | "05": "maj", 21 | "06": "czerwiec", 22 | "07": "lipiec", 23 | "08": "sierpień", 24 | "09": "wrzesień", 25 | "10": "październik", 26 | "11": "listopad", 27 | "12": "grudzień", 28 | } 29 | 30 | def day_of_week(self): 31 | day = self.date("%w") 32 | return self.DAY_NAMES[day] 33 | 34 | def month_name(self): 35 | month = self.month() 36 | return self.MONTH_NAMES[month] 37 | -------------------------------------------------------------------------------- /faker/providers/date_time/pt_BR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | DAY_NAMES = { 6 | "0": "domingo", 7 | "1": "segunda-feira", 8 | "2": "terça-feira", 9 | "3": "quarta-feira", 10 | "4": "quinta-feira", 11 | "5": "sexta-feira", 12 | "6": "sábado", 13 | } 14 | 15 | MONTH_NAMES = { 16 | "01": "janeiro", 17 | "02": "fevereiro", 18 | "03": "março", 19 | "04": "abril", 20 | "05": "maio", 21 | "06": "junho", 22 | "07": "julho", 23 | "08": "agosto", 24 | "09": "setembro", 25 | "10": "outubro", 26 | "11": "novembro", 27 | "12": "dezembro", 28 | } 29 | 30 | def day_of_week(self): 31 | day = self.date("%w") 32 | return self.DAY_NAMES[day] 33 | 34 | def month_name(self): 35 | month = self.month() 36 | return self.MONTH_NAMES[month] 37 | -------------------------------------------------------------------------------- /faker/providers/date_time/pt_PT/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | DAY_NAMES = { 6 | "0": "domingo", 7 | "1": "segunda-feira", 8 | "2": "terça-feira", 9 | "3": "quarta-feira", 10 | "4": "quinta-feira", 11 | "5": "sexta-feira", 12 | "6": "sábado", 13 | } 14 | 15 | MONTH_NAMES = { 16 | "01": "janeiro", 17 | "02": "fevereiro", 18 | "03": "março", 19 | "04": "abril", 20 | "05": "maio", 21 | "06": "junho", 22 | "07": "julho", 23 | "08": "agosto", 24 | "09": "setembro", 25 | "10": "outubro", 26 | "11": "novembro", 27 | "12": "dezembro", 28 | } 29 | 30 | def day_of_week(self): 31 | day = self.date("%w") 32 | return self.DAY_NAMES[day] 33 | 34 | def month_name(self): 35 | month = self.month() 36 | return self.MONTH_NAMES[month] 37 | -------------------------------------------------------------------------------- /faker/providers/date_time/ro_RO/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | DAY_NAMES = { 6 | "0": "duminica", 7 | "1": "luni", 8 | "2": "marti", 9 | "3": "miercuri", 10 | "4": "joi", 11 | "5": "vineri", 12 | "6": "sambata", 13 | } 14 | 15 | MONTH_NAMES = { 16 | "01": "ianuarie", 17 | "02": "februarie", 18 | "03": "martie", 19 | "04": "aprilie", 20 | "05": "mai", 21 | "06": "iunie", 22 | "07": "iulie", 23 | "08": "august", 24 | "09": "septembrie", 25 | "10": "octombrie", 26 | "11": "noiembrie", 27 | "12": "decembrie", 28 | } 29 | 30 | def day_of_week(self): 31 | day = self.date("%w") 32 | return self.DAY_NAMES[day] 33 | 34 | def month_name(self): 35 | month = self.month() 36 | return self.MONTH_NAMES[month] 37 | -------------------------------------------------------------------------------- /faker/providers/date_time/sk_SK/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | DAY_NAMES = { 6 | "0": "nedeľa", 7 | "1": "pondelok", 8 | "2": "utorok", 9 | "3": "streda", 10 | "4": "štvrtok", 11 | "5": "piatok", 12 | "6": "sobota", 13 | } 14 | 15 | MONTH_NAMES = { 16 | "01": "január", 17 | "02": "február", 18 | "03": "marec", 19 | "04": "apríl", 20 | "05": "máj", 21 | "06": "jún", 22 | "07": "júl", 23 | "08": "august", 24 | "09": "september", 25 | "10": "október", 26 | "11": "november", 27 | "12": "december", 28 | } 29 | 30 | def day_of_week(self): 31 | day = self.date("%w") 32 | return self.DAY_NAMES[day] 33 | 34 | def month_name(self): 35 | month = self.month() 36 | return self.MONTH_NAMES[month] 37 | -------------------------------------------------------------------------------- /faker/providers/date_time/sl_SI/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | DAY_NAMES = { 6 | "0": "Nedelja", 7 | "1": "Ponedeljek", 8 | "2": "Torek", 9 | "3": "Sreda", 10 | "4": "Četrtek", 11 | "5": "Petek", 12 | "6": "Sobota", 13 | } 14 | 15 | MONTH_NAMES = { 16 | "01": "Januar", 17 | "02": "Februar", 18 | "03": "Marec", 19 | "04": "April", 20 | "05": "Maj", 21 | "06": "Junij", 22 | "07": "Julij", 23 | "08": "Avgust", 24 | "09": "September", 25 | "10": "Oktober", 26 | "11": "November", 27 | "12": "December", 28 | } 29 | 30 | def day_of_week(self) -> str: 31 | day = self.date("%w") 32 | return self.DAY_NAMES[day] 33 | 34 | def month_name(self) -> str: 35 | month = self.month() 36 | return self.MONTH_NAMES[month] 37 | -------------------------------------------------------------------------------- /faker/providers/date_time/ta_IN/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | # Source: http://www.localeplanet.com/icu/ta-IN/index.html 6 | DAY_NAMES = { 7 | "0": "திங்கள்", 8 | "1": "செவ்வாய்", 9 | "2": "புதன்", 10 | "3": "வியாழன்", 11 | "4": "வெள்ளி", 12 | "5": "சனி", 13 | "6": "ஞாயிறு", 14 | } 15 | 16 | MONTH_NAMES = { 17 | "01": "ஜனவரி", 18 | "02": "பிப்ரவரி", 19 | "03": "மார்ச்", 20 | "04": "ஏப்ரல்", 21 | "05": "மே", 22 | "06": "ஜூன்", 23 | "07": "ஜூலை", 24 | "08": "ஆகஸ்ட்", 25 | "09": "செப்டம்பர்", 26 | "10": "அக்டோபர்", 27 | "11": "நவம்பர்", 28 | "12": "டிசம்பர்", 29 | } 30 | 31 | def day_of_week(self) -> str: 32 | day = self.date("%w") 33 | return self.DAY_NAMES[day] 34 | 35 | def month_name(self) -> str: 36 | month = self.month() 37 | return self.MONTH_NAMES[month] 38 | -------------------------------------------------------------------------------- /faker/providers/date_time/tl_PH/__init__.py: -------------------------------------------------------------------------------- 1 | from ..fil_PH import Provider as FilPhProvider 2 | 3 | 4 | class Provider(FilPhProvider): 5 | """No difference from DateTime Provider for fil_PH locale""" 6 | 7 | pass 8 | -------------------------------------------------------------------------------- /faker/providers/date_time/tr_TR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | DAY_NAMES = { 6 | "0": "Pazar", 7 | "1": "Pazartesi", 8 | "2": "Salı", 9 | "3": "Çarşamba", 10 | "4": "Perşembe", 11 | "5": "Cuma", 12 | "6": "Cumartesi", 13 | } 14 | 15 | MONTH_NAMES = { 16 | "01": "Ocak", 17 | "02": "Şubat", 18 | "03": "Mart", 19 | "04": "Nisan", 20 | "05": "Mayıs", 21 | "06": "Haziran", 22 | "07": "Temmuz", 23 | "08": "Ağustos", 24 | "09": "Eylül", 25 | "10": "Ekim", 26 | "11": "Kasım", 27 | "12": "Aralık", 28 | } 29 | 30 | def day_of_week(self): 31 | day = self.date("%w") 32 | return self.DAY_NAMES[day] 33 | 34 | def month_name(self): 35 | month = self.month() 36 | return self.MONTH_NAMES[month] 37 | -------------------------------------------------------------------------------- /faker/providers/date_time/uz_UZ/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | DAY_NAMES = { 6 | "0": "Dushanba", 7 | "1": "Seshanba", 8 | "2": "Chorshanba", 9 | "3": "Payshanba", 10 | "4": "Juma", 11 | "5": "Shanba", 12 | "6": "Yakshanba", 13 | } 14 | 15 | MONTH_NAMES = { 16 | "01": "Yanvar", 17 | "02": "Fevral", 18 | "03": "Mart", 19 | "04": "Aprel", 20 | "05": "May", 21 | "06": "Iyun", 22 | "07": "Iyul", 23 | "08": "Avgust", 24 | "09": "Sentabr", 25 | "10": "Oktabr", 26 | "11": "Noyabr", 27 | "12": "Dekabr", 28 | } 29 | 30 | def day_of_week(self) -> str: 31 | day = self.date("%w") 32 | return self.DAY_NAMES[day] 33 | 34 | def month_name(self) -> str: 35 | month = self.month() 36 | return self.MONTH_NAMES[month] 37 | -------------------------------------------------------------------------------- /faker/providers/date_time/vi_VN/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | # Source: https://vi.wikipedia.org/wiki/%C4%90%E1%BB%8Bnh_d%E1%BA%A1ng_ng%C3%A0y_v%C3%A0_gi%E1%BB%9D_%E1%BB%9F_Vi%E1%BB%87t_Nam # NOQA 6 | DAY_NAMES = { 7 | "0": "Chủ Nhật", 8 | "1": "Thứ Hai", 9 | "2": "Thứ Ba", 10 | "3": "Thứ Tư", 11 | "4": "Thứ Năm", 12 | "5": "Thứ Sáu", 13 | "6": "Thứ Bảy", 14 | } 15 | 16 | MONTH_NAMES = { 17 | "01": "Tháng Một", 18 | "02": "Tháng Hai", 19 | "03": "Tháng Ba", 20 | "04": "Tháng Tư", 21 | "05": "Tháng Năm", 22 | "06": "Tháng Sáu", 23 | "07": "Tháng Bảy", 24 | "08": "Tháng Tám", 25 | "09": "Tháng Chín", 26 | "10": "Tháng Mười", 27 | "11": "Tháng Mười Một", 28 | "12": "Tháng Mười Hai", 29 | } 30 | 31 | def day_of_week(self): 32 | day = self.date("%w") 33 | return self.DAY_NAMES[day] 34 | 35 | def month_name(self): 36 | month = self.month() 37 | return self.MONTH_NAMES[month] 38 | -------------------------------------------------------------------------------- /faker/providers/date_time/zh_CN/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | MONTH_NAMES = { 6 | "01": "一月", 7 | "02": "二月", 8 | "03": "三月", 9 | "04": "四月", 10 | "05": "五月", 11 | "06": "六月", 12 | "07": "七月", 13 | "08": "八月", 14 | "09": "九月", 15 | "10": "十月", 16 | "11": "十一月", 17 | "12": "十二月", 18 | } 19 | DAY_NAMES = { 20 | "0": "星期日", 21 | "1": "星期一", 22 | "2": "星期二", 23 | "3": "星期三", 24 | "4": "星期四", 25 | "5": "星期五", 26 | "6": "星期六", 27 | } 28 | 29 | def day_of_week(self) -> str: 30 | day = self.date("%w") 31 | return self.DAY_NAMES[day] 32 | 33 | def month_name(self) -> str: 34 | month = self.month() 35 | return self.MONTH_NAMES[month] 36 | -------------------------------------------------------------------------------- /faker/providers/date_time/zh_TW/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as DateTimeProvider 2 | 3 | 4 | class Provider(DateTimeProvider): 5 | MONTH_NAMES = { 6 | "01": "一月", 7 | "02": "二月", 8 | "03": "三月", 9 | "04": "四月", 10 | "05": "五月", 11 | "06": "六月", 12 | "07": "七月", 13 | "08": "八月", 14 | "09": "九月", 15 | "10": "十月", 16 | "11": "十一月", 17 | "12": "十二月", 18 | } 19 | DAY_NAMES = { 20 | "0": "星期日", 21 | "1": "星期一", 22 | "2": "星期二", 23 | "3": "星期三", 24 | "4": "星期四", 25 | "5": "星期五", 26 | "6": "星期六", 27 | } 28 | 29 | def day_of_week(self) -> str: 30 | day = self.date("%w") 31 | return self.DAY_NAMES[day] 32 | 33 | def month_name(self) -> str: 34 | month = self.month() 35 | return self.MONTH_NAMES[month] 36 | 37 | def minguo_year(self) -> str: 38 | year = self.year() 39 | return str(int(year) - 1911) 40 | -------------------------------------------------------------------------------- /faker/providers/doi/__init__.py: -------------------------------------------------------------------------------- 1 | from faker.providers import BaseProvider 2 | 3 | 4 | class Provider(BaseProvider): 5 | """ 6 | Provider for Digital Object Identifier (DOI) 7 | Source of info: https://en.wikipedia.org/wiki/Digital_object_identifier (English) 8 | """ 9 | 10 | def doi(self) -> str: 11 | """ 12 | Generate a valid Digital Object Identifier (DOI). 13 | Format: 10.{4-9 digits}/{alphanumeric string} 14 | Eg: 10.1000/xyz123 15 | 16 | :sample: 17 | """ 18 | prefix = "10" 19 | registrant = str(self.generator.random.randint(1000, 99999999)) 20 | suffix = self.generator.bothify("?#?#?##").lower() 21 | 22 | return f"{prefix}.{registrant}/{suffix}" 23 | -------------------------------------------------------------------------------- /faker/providers/emoji/en_US/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as EmojiProvider 2 | 3 | 4 | class Provider(EmojiProvider): 5 | pass 6 | -------------------------------------------------------------------------------- /faker/providers/file/en_US/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as FileProvider 2 | 3 | 4 | class Provider(FileProvider): 5 | pass 6 | -------------------------------------------------------------------------------- /faker/providers/geo/de_AT/__init__.py: -------------------------------------------------------------------------------- 1 | from decimal import Decimal 2 | 3 | from .. import Provider as GeoProvider 4 | 5 | 6 | class Provider(GeoProvider): 7 | def local_latitude(self) -> Decimal: 8 | return self.coordinate(center=47.60707, radius=1) 9 | 10 | def local_longitude(self) -> Decimal: 11 | return self.coordinate(center=13.37208, radius=2) 12 | -------------------------------------------------------------------------------- /faker/providers/geo/el_GR/__init__.py: -------------------------------------------------------------------------------- 1 | from decimal import Decimal 2 | from typing import Any, Tuple 3 | 4 | from .. import Provider as GeoProvider 5 | 6 | 7 | class Provider(GeoProvider): 8 | poly = ( 9 | ("40.34026", "19.15120"), 10 | ("42.21670", "26.13934"), 11 | ("35.55680", "29.38280"), 12 | ("34.15370", "22.58810"), 13 | ) 14 | 15 | def local_latlng(self, *args: Any, **kwargs: Any) -> Tuple[str, str]: 16 | return str(self.local_latitude()), str(self.local_longitude()) 17 | 18 | def local_latitude(self) -> Decimal: 19 | latitudes = [int(Decimal(t[0]) * 10000000) for t in self.poly] 20 | return Decimal(str(self.generator.random.randint(min(latitudes), max(latitudes)) / 10000000)).quantize( 21 | Decimal(".000001") 22 | ) 23 | 24 | def local_longitude(self) -> Decimal: 25 | longitudes = [int(Decimal(t[1]) * 10000000) for t in self.poly] 26 | return Decimal(str(self.generator.random.randint(min(longitudes), max(longitudes)) / 10000000)).quantize( 27 | Decimal(".000001") 28 | ) 29 | -------------------------------------------------------------------------------- /faker/providers/geo/en_US/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BaseProvider 2 | 3 | 4 | class Provider(BaseProvider): 5 | pass 6 | -------------------------------------------------------------------------------- /faker/providers/internet/az_AZ/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as InternetProvider 2 | 3 | 4 | class Provider(InternetProvider): 5 | user_name_formats = ( 6 | "{{last_name_female}}.{{first_name_female}}", 7 | "{{last_name_male}}.{{first_name_male}}", 8 | "{{last_name_male}}.{{first_name_male}}", 9 | "{{first_name_male}}.{{last_name_male}}", 10 | "{{first_name}}##", 11 | "{{first_name}}_##", 12 | "?{{last_name}}", 13 | "{{first_name}}{{year}}", 14 | "{{first_name}}_{{year}}", 15 | ) 16 | 17 | email_formats = ("{{user_name}}@{{free_email_domain}}", "{{user_name}}@{{domain_name}}") 18 | 19 | free_email_domains = ("gmail.com", "yahoo.com", "hotmail.com", "mail.ru", "yandex.ru", "box.az", "amail.az") 20 | 21 | tlds = ("az", "com", "biz", "info", "net", "org", "edu") 22 | 23 | replacements = ( 24 | ("Ə", "e"), 25 | ("I", "i"), 26 | ("Ü", "u"), 27 | ("Ş", "sh"), 28 | ("Ç", "c"), 29 | ("Ğ", "g"), 30 | ("Ö", "o"), 31 | ("ə", "e"), 32 | ("ı", "i"), 33 | ("ü", "u"), 34 | ("ş", "sh"), 35 | ("ç", "c"), 36 | ("ğ", "g"), 37 | ("ö", "o"), 38 | ) 39 | -------------------------------------------------------------------------------- /faker/providers/internet/bn_BD/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as InternetProvider 2 | 3 | 4 | class Provider(InternetProvider): 5 | """ 6 | Implement internet provider for ``bn_BD`` locale. 7 | """ 8 | 9 | free_email_domains = ( 10 | "gmail.com", 11 | "yahoo.com", 12 | "hotmail.com", 13 | "mail.ru", 14 | "yandex.ru", 15 | "rambler.ru", 16 | ) 17 | 18 | tlds = ( 19 | "com", 20 | "com", 21 | "com", 22 | "com", 23 | "com", 24 | "com", 25 | "biz", 26 | "info", 27 | "net", 28 | "org", 29 | "com.bd", 30 | ) 31 | -------------------------------------------------------------------------------- /faker/providers/internet/bs_BA/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as InternetProvider 2 | 3 | 4 | class Provider(InternetProvider): 5 | free_email_domains = ( 6 | "gmail.com", 7 | "hotmail.com", 8 | "yahoo.com", 9 | "outlook.com", 10 | "bih.net.ba", 11 | "tel.net.ba", 12 | ) 13 | 14 | tlds = ("ba", "com.ba", "org.ba", "net.ba", "gov.ba", "edu.ba", "unsa.ba") 15 | 16 | replacements = ( 17 | ("č", "c"), 18 | ("Č", "C"), 19 | ("ć", "c"), 20 | ("Ć", "C"), 21 | ("đ", "dj"), 22 | ("Đ", "Dj"), 23 | ("š", "s"), 24 | ("Š", "S"), 25 | ("ž", "z"), 26 | ("Ž", "Z"), 27 | ) 28 | -------------------------------------------------------------------------------- /faker/providers/internet/cs_CZ/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as InternetProvider 2 | 3 | 4 | class Provider(InternetProvider): 5 | user_name_formats = ( 6 | "{{last_name_female}}.{{first_name_female}}", 7 | "{{last_name_female}}.{{first_name_female}}", 8 | "{{last_name_male}}.{{first_name_male}}", 9 | "{{last_name_male}}.{{first_name_male}}", 10 | "{{first_name_female}}.{{last_name_female}}", 11 | "{{first_name_male}}.{{last_name_male}}", 12 | "{{first_name}}##", 13 | "?{{last_name}}", 14 | "?{{last_name}}", 15 | "?{{last_name}}", 16 | ) 17 | 18 | email_formats = ("{{user_name}}@{{free_email_domain}}",) 19 | 20 | free_email_domains = ( 21 | "seznam.cz", 22 | "gmail.com", 23 | "email.cz", 24 | "post.cz", 25 | "chello.cz", 26 | "centrum.cz", 27 | "volny.cz", 28 | ) 29 | 30 | tlds = ("cz", "com", "cz") 31 | -------------------------------------------------------------------------------- /faker/providers/internet/de_AT/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as InternetProvider 2 | 3 | 4 | class Provider(InternetProvider): 5 | free_email_domains = ( 6 | "chello.at", 7 | "gmail.com", 8 | "gmx.at", 9 | "kabsi.at", 10 | ) 11 | tlds = ("at", "co.at", "com", "net", "org") 12 | 13 | replacements = ( 14 | ("ä", "ae"), 15 | ("Ä", "Ae"), 16 | ("ö", "oe"), 17 | ("Ö", "Oe"), 18 | ("ü", "ue"), 19 | ("Ü", "Ue"), 20 | ("ß", "ss"), 21 | ) 22 | -------------------------------------------------------------------------------- /faker/providers/internet/de_DE/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as InternetProvider 2 | 3 | 4 | class Provider(InternetProvider): 5 | free_email_domains = ( 6 | "aol.de", 7 | "gmail.com", 8 | "gmx.de", 9 | "googlemail.com", 10 | "hotmail.de", 11 | "web.de", 12 | "yahoo.de", 13 | ) 14 | tlds = ("com", "com", "com", "net", "org", "de", "de", "de") 15 | 16 | replacements = ( 17 | ("ä", "ae"), 18 | ("Ä", "Ae"), 19 | ("ö", "oe"), 20 | ("Ö", "Oe"), 21 | ("ü", "ue"), 22 | ("Ü", "Ue"), 23 | ("é", "e"), 24 | ("É", "E"), 25 | ("à", "a"), 26 | ("À", "A"), 27 | ("ß", "ss"), 28 | ) 29 | -------------------------------------------------------------------------------- /faker/providers/internet/en_AU/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as InternetProvider 2 | 3 | 4 | class Provider(InternetProvider): 5 | free_email_domains = ( 6 | "gmail.com", 7 | "yahoo.com", 8 | "hotmail.com", 9 | "yahoo.com.au", 10 | "hotmail.com.au", 11 | ) 12 | 13 | tlds = ( 14 | "com", 15 | "com.au", 16 | "org", 17 | "org.au", 18 | "net", 19 | "net.au", 20 | "biz", 21 | "info", 22 | "edu", 23 | "edu.au", 24 | ) 25 | -------------------------------------------------------------------------------- /faker/providers/internet/en_GB/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as InternetProvider 2 | 3 | 4 | class Provider(InternetProvider): 5 | # Data taken from 6 | # https://github.com/fzaninotto/Faker/blob/master/src/Faker/Provider/en_GB/Internet.php 7 | 8 | free_email_domains = ( 9 | "gmail.com", 10 | "yahoo.com", 11 | "hotmail.com", 12 | "yahoo.co.uk", 13 | "hotmail.co.uk", 14 | "outlook.com", 15 | ) 16 | 17 | tlds = ( 18 | "com", 19 | "com", 20 | "com", 21 | "com", 22 | "com", 23 | "com", 24 | "biz", 25 | "info", 26 | "net", 27 | "org", 28 | "co.uk", 29 | ) 30 | -------------------------------------------------------------------------------- /faker/providers/internet/en_NZ/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as InternetProvider 2 | 3 | 4 | class Provider(InternetProvider): 5 | free_email_domains = ( 6 | "gmail.com", 7 | "yahoo.com", 8 | "hotmail.com", 9 | "inspire.net.nz", 10 | "xtra.co.nz", 11 | ) 12 | 13 | tlds = ( 14 | "nz", 15 | "co.nz", 16 | "org.nz", 17 | "kiwi", 18 | "kiwi.nz", 19 | "geek.nz", 20 | "net.nz", 21 | "school.nz", 22 | "ac.nz", 23 | "maori.nz", 24 | ) 25 | -------------------------------------------------------------------------------- /faker/providers/internet/en_US/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as InternetProvider 2 | 3 | 4 | class Provider(InternetProvider): 5 | pass 6 | -------------------------------------------------------------------------------- /faker/providers/internet/es_AR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as InternetProvider 2 | 3 | 4 | class Provider(InternetProvider): 5 | safe_email_tlds = ("com", "net", "ar") 6 | tlds = ("com", "com.ar", "com.ar", "net", "org", "net.ar", "ar", "ar") 7 | replacements = ( 8 | ("à", "a"), 9 | ("â", "a"), 10 | ("ã", "a"), 11 | ("á", "a"), 12 | ("ç", "c"), 13 | ("é", "e"), 14 | ("ê", "e"), 15 | ("í", "i"), 16 | ("ô", "o"), 17 | ("ö", "o"), 18 | ("õ", "o"), 19 | ("ó", "o"), 20 | ("ú", "u"), 21 | ) 22 | -------------------------------------------------------------------------------- /faker/providers/internet/es_CL/__init__.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | from faker.utils.decorators import lowercase, slugify_unicode 4 | 5 | from .. import Provider as InternetProvider 6 | 7 | 8 | class Provider(InternetProvider): 9 | safe_email_tlds = ("com", "net", "cl", "cl") 10 | tlds = ("com", "com", "com", "net", "org", "cl", "cl", "cl") 11 | replacements = ( 12 | ("à", "a"), 13 | ("â", "a"), 14 | ("ã", "a"), 15 | ("á", "a"), 16 | ("ç", "c"), 17 | ("é", "e"), 18 | ("ê", "e"), 19 | ("í", "i"), 20 | ("ô", "o"), 21 | ("ö", "o"), 22 | ("õ", "o"), 23 | ("ó", "o"), 24 | ("ú", "u"), 25 | ) 26 | 27 | @lowercase 28 | @slugify_unicode 29 | def domain_word(self) -> str: 30 | company: str = self.generator.format("company") 31 | company_elements: List[str] = company.split(" ") 32 | # select 2 items as companies include prefix 33 | name_items = company_elements[:2] 34 | return self._to_ascii("".join(name_items)) 35 | -------------------------------------------------------------------------------- /faker/providers/internet/es_ES/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as InternetProvider 2 | 3 | 4 | class Provider(InternetProvider): 5 | safe_email_tlds = ("com", "net", "es", "es") 6 | tlds = ("com", "com", "com", "net", "org", "es", "es", "es") 7 | replacements = ( 8 | ("à", "a"), 9 | ("â", "a"), 10 | ("ã", "a"), 11 | ("á", "a"), 12 | ("ç", "c"), 13 | ("é", "e"), 14 | ("ê", "e"), 15 | ("í", "i"), 16 | ("ô", "o"), 17 | ("ö", "o"), 18 | ("õ", "o"), 19 | ("ó", "o"), 20 | ("ú", "u"), 21 | ) 22 | -------------------------------------------------------------------------------- /faker/providers/internet/fa_IR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BaseProvider 2 | 3 | 4 | class Provider(BaseProvider): 5 | safe_email_tlds = ("com", "net", "ir", "org") 6 | free_email_domains = ( 7 | "chmail.ir", 8 | "mailfa.com", 9 | "gmail.com", 10 | "hotmail.com", 11 | "yahoo.com", 12 | ) 13 | tlds = ("com", "com", "com", "net", "org", "ir", "ir", "ir") 14 | -------------------------------------------------------------------------------- /faker/providers/internet/fi_FI/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as InternetProvider 2 | 3 | 4 | class Provider(InternetProvider): 5 | free_email_domains = ( 6 | "gmail.com", 7 | "googlemail.com", 8 | "hotmail.com", 9 | "suomi24.fi", 10 | "kolumbus.fi", 11 | "luukku.com", 12 | "surffi.net", 13 | ) 14 | 15 | tlds = ("com", "com", "com", "fi", "fi", "net", "org") 16 | -------------------------------------------------------------------------------- /faker/providers/internet/fil_PH/__init__.py: -------------------------------------------------------------------------------- 1 | from ..en_PH import Provider as EnPhInternetProvider 2 | 3 | 4 | class Provider(EnPhInternetProvider): 5 | """No difference from Internet Provider for en_PH locale""" 6 | 7 | pass 8 | -------------------------------------------------------------------------------- /faker/providers/internet/fr_CH/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as InternetProvider 2 | 3 | 4 | class Provider(InternetProvider): 5 | safe_email_tlds = ("org", "com", "net", "ch") 6 | free_email_domains = ( 7 | "gmail.com", 8 | "hotmail.fr", 9 | "yahoo.fr", 10 | "bluewin.ch", 11 | "romandie.com", 12 | "hispeed.ch", 13 | "sunrise.ch", 14 | "vtxnet.ch", 15 | ) 16 | tlds = ("com", "com", "com", "net", "org", "ch", "ch", "ch") 17 | 18 | replacements = ( 19 | ("ä", "ae"), 20 | ("à", "a"), 21 | ("â", "a"), 22 | ("ç", "c"), 23 | ("é", "e"), 24 | ("è", "e"), 25 | ("ê", "e"), 26 | ("ë", "e"), 27 | ("ï", "i"), 28 | ("î", "i"), 29 | ("ö", "oe"), 30 | ("ô", "o"), 31 | ("ü", "ue"), 32 | ("ù", "u"), 33 | ("ü", "u"), 34 | ("ß", "ss"), 35 | ) 36 | -------------------------------------------------------------------------------- /faker/providers/internet/fr_FR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as InternetProvider 2 | 3 | 4 | class Provider(InternetProvider): 5 | safe_email_tlds = ("com", "net", "fr", "fr") 6 | free_email_domains = ( 7 | "voila.fr", 8 | "gmail.com", 9 | "hotmail.fr", 10 | "yahoo.fr", 11 | "laposte.net", 12 | "free.fr", 13 | "sfr.fr", 14 | "orange.fr", 15 | "bouygtel.fr", 16 | "club-internet.fr", 17 | "dbmail.com", 18 | "live.com", 19 | "ifrance.com", 20 | "noos.fr", 21 | "tele2.fr", 22 | "tiscali.fr", 23 | "wanadoo.fr", 24 | ) 25 | tlds = ("com", "com", "com", "net", "org", "fr", "fr", "fr") 26 | replacements = ( 27 | ("à", "a"), 28 | ("â", "a"), 29 | ("ä", "a"), 30 | ("ç", "c"), 31 | ("é", "e"), 32 | ("è", "e"), 33 | ("ê", "e"), 34 | ("ë", "e"), 35 | ("É", "e"), 36 | ("ï", "i"), 37 | ("î", "i"), 38 | ("ô", "o"), 39 | ("ö", "o"), 40 | ("ù", "u"), 41 | ("ü", "u"), 42 | ) 43 | -------------------------------------------------------------------------------- /faker/providers/internet/hr_HR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as InternetProvider 2 | 3 | 4 | class Provider(InternetProvider): 5 | free_email_domains = ( 6 | "gmail.com", 7 | "hotmail.com", 8 | "yahoo.com", 9 | "net.hr", 10 | "zg.t-com.hr", 11 | "inet.hr", 12 | "t.ht.hr", 13 | "vip.hr", 14 | "globalnet.hr", 15 | "xnet.hr", 16 | "yahoo.hr", 17 | "zagreb.hr", 18 | ) 19 | 20 | tlds = ("hr", "com", "com.hr", "info", "org", "net", "biz") 21 | 22 | replacements = ( 23 | ("č", "c"), 24 | ("Č", "C"), 25 | ("ć", "c"), 26 | ("Ć", "C"), 27 | ("đ", "dj"), 28 | ("Đ", "Dj"), 29 | ("š", "s"), 30 | ("Š", "S"), 31 | ("ž", "z"), 32 | ("Ž", "Z"), 33 | ) 34 | -------------------------------------------------------------------------------- /faker/providers/internet/hu_HU/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as InternetProvider 2 | 3 | 4 | class Provider(InternetProvider): 5 | free_email_domains = ( 6 | "gmail.com", 7 | "hotmail.com", 8 | "yahoo.com", 9 | ) 10 | 11 | tlds = ( 12 | "hu", 13 | "com", 14 | "com.hu", 15 | "info", 16 | "org", 17 | "net", 18 | "biz", 19 | ) 20 | 21 | replacements = ( 22 | ("ö", "o"), 23 | ("ü", "u"), 24 | ("á", "a"), 25 | ("é", "e"), 26 | ("í", "i"), 27 | ("ó", "i"), 28 | ("ő", "o"), 29 | ("ú", "u"), 30 | ("ű", "u"), 31 | ) 32 | -------------------------------------------------------------------------------- /faker/providers/internet/id_ID/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as InternetProvider 2 | 3 | 4 | class Provider(InternetProvider): 5 | tlds = ( 6 | # From https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains 7 | "com", 8 | "org", 9 | "net", 10 | "int", 11 | "edu", 12 | "gov", 13 | "mil", 14 | # From https://id.wikipedia.org/wiki/.id 15 | "id", 16 | "ac.id", 17 | "biz.id", 18 | "co.id", 19 | "desa.id", 20 | "go.id", 21 | "mil.id", 22 | "my.id", 23 | "net.id", 24 | "or.id", 25 | "ponpes.id", 26 | "sch.id", 27 | "web.id", 28 | ) 29 | -------------------------------------------------------------------------------- /faker/providers/internet/it_IT/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as InternetProvider 2 | 3 | 4 | class Provider(InternetProvider): 5 | safe_email_tlds = ("com", "net", "eu", "it", "it", "it") 6 | free_email_domains = ( 7 | "libero.it", 8 | "libero.it", 9 | "libero.it", 10 | "tim.it", 11 | "tin.it", 12 | "alice.it", 13 | "virgilio.it", 14 | "tiscali.it", 15 | "fastwebnet.it", 16 | "vodafone.it", 17 | "poste.it", 18 | "gmail.com", 19 | "gmail.com", 20 | "gmail.com", 21 | "outlook.com", 22 | "live.com", 23 | "hotmail.com", 24 | "hotmail.it", 25 | "yahoo.com", 26 | "tele2.it", 27 | ) 28 | tlds = ("com", "com", "com", "net", "org", "eu", "it", "it", "it", "it") 29 | replacements = ( 30 | ("à", "a"), 31 | ("é", "e"), 32 | ("è", "e"), 33 | ("ì", "i"), 34 | ("ò", "o"), 35 | ("ù", "u"), 36 | ) 37 | -------------------------------------------------------------------------------- /faker/providers/internet/ja_JP/__init__.py: -------------------------------------------------------------------------------- 1 | from faker.utils.decorators import slugify 2 | 3 | from .. import Provider as InternetProvider 4 | 5 | 6 | class Provider(InternetProvider): 7 | user_name_formats = ( 8 | "{{last_romanized_name}}.{{first_romanized_name}}", 9 | "{{first_romanized_name}}.{{last_romanized_name}}", 10 | "{{first_romanized_name}}##", 11 | "?{{last_romanized_name}}", 12 | ) 13 | tlds = ("com", "com", "com", "net", "org", "jp", "jp", "jp") 14 | 15 | @slugify 16 | def domain_word(self) -> str: 17 | return self.generator.format("last_romanized_name") 18 | -------------------------------------------------------------------------------- /faker/providers/internet/ko_KR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as InternetProvider 2 | 3 | 4 | class Provider(InternetProvider): 5 | free_email_domains = ( 6 | "gmail.com", 7 | "daum.net", 8 | "hotmail.com", 9 | "hanmail.net", 10 | "naver.com", 11 | "nate.com", 12 | "live.com", 13 | "dreamwiz.com", 14 | ) 15 | tlds = ("com", "com", "com", "kr", "kr", "net", "org") 16 | -------------------------------------------------------------------------------- /faker/providers/internet/no_NO/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as InternetProvider 2 | 3 | 4 | class Provider(InternetProvider): 5 | tlds = ("com", "com", "com", "net", "org", "no", "no", "no", "no", "no") 6 | 7 | replacements = ( 8 | ("æ", "ae"), 9 | ("Æ", "Ae"), 10 | ("ø", "oe"), 11 | ("Ø", "Oe"), 12 | ("å", "aa"), 13 | ("Å", "Aa"), 14 | ("ä", "ae"), 15 | ("Ä", "Ae"), 16 | ("ö", "oe"), 17 | ("Ö", "Oe"), 18 | ("ü", "ue"), 19 | ("Ü", "Ue"), 20 | ) 21 | -------------------------------------------------------------------------------- /faker/providers/internet/pl_PL/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as InternetProvider 2 | 3 | 4 | class Provider(InternetProvider): 5 | free_email_domains = ( 6 | "onet.pl", 7 | "interia.pl", 8 | "gmail.com", 9 | "o2.pl", 10 | "yahoo.com", 11 | "hotmail.com", 12 | ) 13 | 14 | tlds = ("com", "com", "com", "net", "org", "pl", "pl", "pl") 15 | 16 | replacements = ( 17 | ("ą", "a"), 18 | ("ć", "c"), 19 | ("ę", "e"), 20 | ("ł", "l"), 21 | ("ń", "n"), 22 | ("ó", "o"), 23 | ("ś", "s"), 24 | ("ź", "z"), 25 | ("ż", "z"), 26 | ) 27 | -------------------------------------------------------------------------------- /faker/providers/internet/pt_BR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as InternetProvider 2 | 3 | 4 | class Provider(InternetProvider): 5 | safe_email_tlds = ("com", "net", "br", "br") 6 | free_email_domains = ( 7 | "gmail.com", 8 | "hotmail.com", 9 | "yahoo.com.br", 10 | "uol.com.br", 11 | "bol.com.br", 12 | "ig.com.br", 13 | ) 14 | tlds = ("com", "com", "com", "net", "org", "br", "br", "br") 15 | replacements = ( 16 | ("à", "a"), 17 | ("â", "a"), 18 | ("ã", "a"), 19 | ("ç", "c"), 20 | ("é", "e"), 21 | ("ê", "e"), 22 | ("í", "i"), 23 | ("ô", "o"), 24 | ("ö", "o"), 25 | ("õ", "o"), 26 | ("ú", "u"), 27 | ) 28 | -------------------------------------------------------------------------------- /faker/providers/internet/pt_PT/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as InternetProvider 2 | 3 | 4 | class Provider(InternetProvider): 5 | safe_email_tlds = ("com", "net", "pt", "pt") 6 | free_email_domains = ("gmail.com", "hotmail.com", "clix.pt", "sapo.pt") 7 | tlds = ("com", "com", "com", "net", "org", "pt", "pt", "pt") 8 | -------------------------------------------------------------------------------- /faker/providers/internet/ro_RO/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as InternetProvider 2 | 3 | 4 | class Provider(InternetProvider): 5 | user_name_formats = ( 6 | "{{last_name_female}}.{{first_name_female}}", 7 | "{{last_name_female}}.{{first_name_female}}", 8 | "{{last_name_male}}.{{first_name_male}}", 9 | "{{last_name_male}}.{{first_name_male}}", 10 | "{{first_name_female}}.{{last_name_female}}", 11 | "{{first_name_male}}.{{last_name_male}}", 12 | "{{first_name}}##", 13 | "?{{last_name}}", 14 | "?{{last_name}}", 15 | "?{{last_name}}", 16 | ) 17 | 18 | email_formats = ("{{user_name}}@{{free_email_domain}}",) 19 | 20 | free_email_domains = ( 21 | "email.ro", 22 | "gmail.com", 23 | "kappa.ro", 24 | "acasa.ro", 25 | "zzup.ro", 26 | "141.ro", 27 | "post.ro", 28 | ) 29 | 30 | tlds = ("ro", "com", "ro") 31 | -------------------------------------------------------------------------------- /faker/providers/internet/sk_SK/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as InternetProvider 2 | 3 | 4 | class Provider(InternetProvider): 5 | user_name_formats = ( 6 | "{{last_name_female}}.{{first_name_female}}", 7 | "{{last_name_female}}.{{first_name_female}}", 8 | "{{last_name_male}}.{{first_name_male}}", 9 | "{{last_name_male}}.{{first_name_male}}", 10 | "{{first_name_female}}.{{last_name_female}}", 11 | "{{first_name_male}}.{{last_name_male}}", 12 | "{{first_name}}##", 13 | "?{{last_name}}", 14 | "?{{last_name}}", 15 | "?{{last_name}}", 16 | ) 17 | 18 | email_formats = ("{{user_name}}@{{free_email_domain}}",) 19 | 20 | free_email_domains = ( 21 | "zoznam.sk", 22 | "gmail.com", 23 | "centrum.sk", 24 | "post.sk", 25 | "chello.sk", 26 | "pobox.sk", 27 | "szm.sk", 28 | "atlas.sk", 29 | "azet.sk", 30 | "inmail.sk", 31 | ) 32 | 33 | tlds = ("sk", "com") 34 | -------------------------------------------------------------------------------- /faker/providers/internet/sv_SE/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as InternetProvider 2 | 3 | 4 | class Provider(InternetProvider): 5 | free_email_domains = ( 6 | "telia.com", 7 | "gmail.com", 8 | "swipnet.se", 9 | "googlemail.com", 10 | "live.se", 11 | "spray.se", 12 | "yahoo.de", 13 | ) 14 | tlds = ("com", "com", "com", "se", "se", "se", "net", "org") 15 | 16 | replacements = ( 17 | ("å", "a"), 18 | ("Å", "A"), 19 | ("ä", "a"), 20 | ("Ä", "A"), 21 | ("ö", "o"), 22 | ("Ö", "O"), 23 | ) 24 | -------------------------------------------------------------------------------- /faker/providers/internet/th_TH/__init__.py: -------------------------------------------------------------------------------- 1 | from collections import OrderedDict 2 | 3 | from .. import Provider as InternetProvider 4 | 5 | 6 | class Provider(InternetProvider): 7 | free_email_domains = ( 8 | "hotmail.com", 9 | "gmail.com", 10 | "outlook.com", 11 | "yahoo.com", 12 | "ymail.com", 13 | "kon.in.th", 14 | "icloud.com", 15 | "protonmail.com", 16 | ) 17 | 18 | tlds = OrderedDict( 19 | ( 20 | ("in.th", 100), 21 | ("co.th", 80), 22 | ("go.th", 40), 23 | ("or.th", 40), 24 | ("ac.th", 20), 25 | ("net.th", 10), 26 | ("mi.th", 5), 27 | ("co", 10), 28 | ("net", 20), 29 | ("com", 150), 30 | ("org", 50), 31 | ), 32 | ) 33 | -------------------------------------------------------------------------------- /faker/providers/internet/tl_PH/__init__.py: -------------------------------------------------------------------------------- 1 | from ..en_PH import Provider as EnPhInternetProvider 2 | 3 | 4 | class Provider(EnPhInternetProvider): 5 | """No difference from Internet Provider for en_PH locale""" 6 | 7 | pass 8 | -------------------------------------------------------------------------------- /faker/providers/internet/tr_TR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as InternetProvider 2 | 3 | 4 | class Provider(InternetProvider): 5 | free_email_domains = ( 6 | "hotmail.com", 7 | "gmail.com", 8 | "yahoo.com", 9 | "yandex.com", 10 | "yaani.com", 11 | "outlook.com", 12 | ) 13 | tlds = ("com", "net", "org", "tr") 14 | 15 | replacements = ( 16 | ("ı", "i"), 17 | ("ğ", "g"), 18 | ("ü", "u"), 19 | ("ş", "s"), 20 | ("ö", "o"), 21 | ("ç", "c"), 22 | ("Ğ", "G"), 23 | ("Ü", "U"), 24 | ("Ş", "S"), 25 | ("İ", "I"), 26 | ("Ö", "O"), 27 | ("Ç", "C"), 28 | ) 29 | -------------------------------------------------------------------------------- /faker/providers/internet/zh_TW/__init__.py: -------------------------------------------------------------------------------- 1 | from faker.utils.decorators import slugify 2 | 3 | from .. import Provider as InternetProvider 4 | 5 | 6 | class Provider(InternetProvider): 7 | user_name_formats = ( 8 | "{{last_romanized_name}}.{{first_romanized_name}}", 9 | "{{first_romanized_name}}.{{last_romanized_name}}", 10 | "{{first_romanized_name}}##", 11 | "?{{last_romanized_name}}", 12 | ) 13 | tlds = ("com", "com", "com", "net", "org", "tw", "tw", "tw") 14 | 15 | @slugify 16 | def domain_word(self): 17 | return self.generator.format("last_romanized_name") 18 | -------------------------------------------------------------------------------- /faker/providers/job/de_DE/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BaseProvider 2 | 3 | 4 | class Provider(BaseProvider): 5 | """ 6 | Source: http://planet-beruf.de/schuelerinnen/mein-beruf/berufe-von-a-z/ 7 | """ 8 | 9 | jobs = [ 10 | "Altenpfleger", 11 | "Asphaltbauer", 12 | "Artist", 13 | "Augenoptiker", 14 | "Ausbaufacharbeiter", 15 | "Bäcker", 16 | "Bankkaufmann", 17 | "Beamter", 18 | "Binnenschiffer", 19 | "Chemikant", 20 | "Chirurgiemechaniker", 21 | "Designer", 22 | "Drogist", 23 | "Erzieher", 24 | "Elektroniker", 25 | "Fachinformatiker", 26 | "Fleischer", 27 | "Florist", 28 | "Forstwirt", 29 | "Friseur", 30 | "Informatiker", 31 | "Programmierer", 32 | "Techniker", 33 | "Mathematiker", 34 | "Koreanistiker", 35 | "Mechaniker", 36 | "Pfleger", 37 | "Polizist", 38 | "Pilot", 39 | "Arzt", 40 | "Krankenschwester", 41 | "Medizininformatiker", 42 | "Schornsteinfeger", 43 | "Winzer", 44 | ] 45 | -------------------------------------------------------------------------------- /faker/providers/job/en_US/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BaseProvider 2 | 3 | 4 | class Provider(BaseProvider): 5 | pass 6 | -------------------------------------------------------------------------------- /faker/providers/job/es_AR/__init__.py: -------------------------------------------------------------------------------- 1 | from ..es import Provider as BaseProvider 2 | 3 | 4 | class Provider(BaseProvider): 5 | pass 6 | -------------------------------------------------------------------------------- /faker/providers/job/es_CL/__init__.py: -------------------------------------------------------------------------------- 1 | from ..es import Provider as BaseProvider 2 | 3 | 4 | class Provider(BaseProvider): 5 | pass 6 | -------------------------------------------------------------------------------- /faker/providers/job/es_CO/__init__.py: -------------------------------------------------------------------------------- 1 | from ..es import Provider as BaseProvider 2 | 3 | 4 | class Provider(BaseProvider): 5 | pass 6 | -------------------------------------------------------------------------------- /faker/providers/job/es_ES/__init__.py: -------------------------------------------------------------------------------- 1 | from ..es import Provider as BaseProvider 2 | 3 | 4 | class Provider(BaseProvider): 5 | pass 6 | -------------------------------------------------------------------------------- /faker/providers/job/es_MX/__init__.py: -------------------------------------------------------------------------------- 1 | from ..es import Provider as BaseProvider 2 | 3 | 4 | class Provider(BaseProvider): 5 | pass 6 | -------------------------------------------------------------------------------- /faker/providers/lorem/de_AT/__init__.py: -------------------------------------------------------------------------------- 1 | from ..de_DE import Provider as GermanProvider 2 | 3 | 4 | class Provider(GermanProvider): 5 | """Implement lorem provider for ``de_DE`` locale. 6 | Using the same as in ```de_DE```. 7 | """ 8 | 9 | pass 10 | -------------------------------------------------------------------------------- /faker/providers/lorem/nl_NL/__init__.py: -------------------------------------------------------------------------------- 1 | from typing import Dict 2 | 3 | from .. import Provider as LoremProvider 4 | from ..nl_BE import Provider as LoremProviderNL_BE 5 | 6 | 7 | class Provider(LoremProvider): 8 | """Implement lorem provider for ``nl_NL`` locale. 9 | 10 | Source: https://nl.wiktionary.org/wiki/WikiWoordenboek:Lijst_met_1000_basiswoorden 11 | """ 12 | 13 | word_list = LoremProviderNL_BE.word_list 14 | parts_of_speech: Dict[str, tuple] = {} 15 | -------------------------------------------------------------------------------- /faker/providers/lorem/tl_PH/__init__.py: -------------------------------------------------------------------------------- 1 | from ..fil_PH import Provider as FilPhProvider 2 | 3 | 4 | class Provider(FilPhProvider): 5 | """Implement lorem provider for ``tl_PH`` locale. 6 | 7 | There is no difference from the |FilPhLoremProvider|. 8 | 9 | .. |FilPhLoremProvider| replace:: 10 | :meth:`FilPhLoremProvider ` 11 | """ 12 | 13 | pass 14 | -------------------------------------------------------------------------------- /faker/providers/misc/en_US/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as MiscProvider 2 | 3 | 4 | class Provider(MiscProvider): 5 | pass 6 | -------------------------------------------------------------------------------- /faker/providers/misc/fil_PH/__init__.py: -------------------------------------------------------------------------------- 1 | from ..en_PH import Provider as EnPhMiscProvider 2 | 3 | 4 | class Provider(EnPhMiscProvider): 5 | """No difference from Misc Provider for en_PH locale (yet)""" 6 | -------------------------------------------------------------------------------- /faker/providers/misc/tl_PH/__init__.py: -------------------------------------------------------------------------------- 1 | from ..en_PH import Provider as EnPhMiscProvider 2 | 3 | 4 | class Provider(EnPhMiscProvider): 5 | """No difference from Misc Provider for en_PH locale (yet)""" 6 | -------------------------------------------------------------------------------- /faker/providers/passport/de_AT/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import ElementsType 2 | from .. import Provider as PassportProvider 3 | 4 | 5 | class Provider(PassportProvider): 6 | """Implement passport provider for ``de_AT`` locale. 7 | 8 | Sources: 9 | 10 | - https://www.bmi.gv.at/607/Reisepass.aspx 11 | """ 12 | 13 | passport_number_formats: ElementsType[str] = ( 14 | "?#######", 15 | "??#######", 16 | ) 17 | -------------------------------------------------------------------------------- /faker/providers/passport/ru_RU/__init__.py: -------------------------------------------------------------------------------- 1 | from typing import Dict, Tuple 2 | 3 | from faker.typing import SexLiteral 4 | 5 | from ... import ElementsType 6 | from .. import Provider as BaseProvider 7 | 8 | GENDER_TO_GENERATOR: Dict[SexLiteral, str] = { 9 | "F": "{{last_name_female}} {{first_name_female}} {{middle_name_female}}", 10 | "M": "{{last_name_male}} {{first_name_male}} {{middle_name_male}}", 11 | "X": "{{last_name_male}} {{first_name_male}} {{middle_name_male}}", 12 | } 13 | 14 | 15 | class Provider(BaseProvider): 16 | passport_number_formats: ElementsType = ( 17 | "## ## ######", 18 | "#### ######", 19 | ) 20 | 21 | def passport_owner(self, gender: SexLiteral = "M") -> Tuple[str, str]: 22 | generator_string = GENDER_TO_GENERATOR[gender] 23 | last_name, first_name, middle_name = self.generator.parse(generator_string).split() 24 | 25 | first_name_united_with_middle = first_name + " " + middle_name 26 | return last_name, first_name_united_with_middle 27 | -------------------------------------------------------------------------------- /faker/providers/person/ar_PS/__init__.py: -------------------------------------------------------------------------------- 1 | from ..ar_AA import Provider as ArabicPersonProvider 2 | 3 | 4 | class Provider(ArabicPersonProvider): 5 | last_names = ( 6 | "أبو اسنينة", 7 | "أبو شقدم", 8 | "أبو شلبك", 9 | "أبو غليون", 10 | "أبو قمر", 11 | "أستيتية", 12 | "الأدغم", 13 | "الإغباري", 14 | "البرغوثي", 15 | "التركمان", 16 | "التميمي", 17 | "الجنيدي", 18 | "الحسيني", 19 | "الحنبلي", 20 | "الخازن", 21 | "الخماش", 22 | "الخياط", 23 | "الزيتاوي", 24 | "الزيدانية", 25 | "السكاكيني", 26 | "الصالحي", 27 | "النشاشيبي", 28 | "النعنيش", 29 | "بدر", 30 | "ترابين", 31 | "جرار", 32 | "جزار", 33 | "حمامي", 34 | "حوسة", 35 | "خوري", 36 | "دغمش", 37 | "دلاشة", 38 | "شاهين", 39 | "صليبا", 40 | "طوقان", 41 | "فطاير", 42 | "قرادة", 43 | "كسواني", 44 | "مرمش", 45 | "مهيار", 46 | "نسيبة", 47 | "هاشم", 48 | ) 49 | -------------------------------------------------------------------------------- /faker/providers/person/ar_SA/__init__.py: -------------------------------------------------------------------------------- 1 | from ..ar_AA import Provider as ArabicPersonProvider 2 | 3 | 4 | class Provider(ArabicPersonProvider): 5 | last_names = ( 6 | "آل الشيخ", 7 | "آل العسكري", 8 | "آل بن ظافر", 9 | "آل بن لافي", 10 | "آل جعفر", 11 | "آل حسين", 12 | "آل خضير", 13 | "آل رفيع", 14 | "آل سعود", 15 | "آل سلطان", 16 | "آل صفوان", 17 | "آل عايض", 18 | "آل عطفة", 19 | "آل علي", 20 | "آل عواض", 21 | "آل قصير", 22 | "آل محمد بن علي بن جماز", 23 | "آل معيض", 24 | "آل مقطة", 25 | "أبا الخيل", 26 | "أبو داوود", 27 | "الجابر", 28 | "الجفالي", 29 | "الحجار", 30 | "الحكير", 31 | "الخرافي", 32 | "الدباغ", 33 | "الراشد", 34 | "الشايع", 35 | "العجلان", 36 | "العقيل", 37 | "العليان", 38 | "المشاولة", 39 | "المغاولة", 40 | "المهنا", 41 | "المهيدب", 42 | "بقشان", 43 | "بن لادن", 44 | "حجار", 45 | "حنبولي", 46 | "شربتلي", 47 | "فصيل", 48 | "كانو", 49 | "مهنا", 50 | ) 51 | -------------------------------------------------------------------------------- /faker/providers/person/fr_QC/__init__.py: -------------------------------------------------------------------------------- 1 | import warnings 2 | 3 | from typing import Any 4 | 5 | from ..fr_CA import Provider as FRCAProvider 6 | 7 | 8 | class Provider(FRCAProvider): 9 | def __init__(self, *args: Any, **kwargs: Any) -> None: 10 | warnings.warn("fr_QC locale is deprecated. Please use fr_CA.") 11 | super().__init__(*args, **kwargs) 12 | -------------------------------------------------------------------------------- /faker/providers/phone_number/bg_BG/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | "+359(0)#########", 7 | "+359(0)### ######", 8 | "+359(0)### ### ###", 9 | "+359#########", 10 | "0#########", 11 | "0### ######", 12 | "0### ### ###", 13 | "0### ###-###", 14 | "(0###) ######", 15 | "(0###) ### ###", 16 | "(0###) ###-###", 17 | ) 18 | -------------------------------------------------------------------------------- /faker/providers/phone_number/bs_BA/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | "030 ### ###", 7 | "031 ### ###", 8 | "032 ### ###", 9 | "033 ### ###", 10 | "034 ### ###", 11 | "035 ### ###", 12 | "036 ### ###", 13 | "037 ### ###", 14 | "038 ### ###", 15 | "039 ### ###", 16 | "049 ### ###", 17 | "050 ### ###", 18 | "051 ### ###", 19 | "052 ### ###", 20 | "053 ### ###", 21 | "054 ### ###", 22 | "055 ### ###", 23 | "056 ### ###", 24 | "057 ### ###", 25 | "058 ### ###", 26 | "059 ### ###", 27 | "060 ### ###", 28 | "060 #### ###", 29 | "061 ### ###", 30 | "062 ### ###", 31 | "063 ### ###", 32 | "064 ### ###", 33 | "065 ### ###", 34 | "066 ### ###", 35 | "067 ### ###", 36 | "070 20# ###", 37 | "+387 61 ### ###", 38 | "+387 (0)61 ### ###", 39 | ) 40 | -------------------------------------------------------------------------------- /faker/providers/phone_number/da_DK/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | "+45 ########", 7 | "+45 #### ####", 8 | "+45 ## ## ## ##", 9 | "########", 10 | "#### ####", 11 | "## ## ## ##", 12 | ) 13 | -------------------------------------------------------------------------------- /faker/providers/phone_number/de_DE/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | # https://de.wikipedia.org/wiki/Rufnummer#Schreibweisen 6 | formats = ( 7 | "+49(0)##########", 8 | "+49(0)#### ######", 9 | "+49 (0) #### ######", 10 | "+49(0) #########", 11 | "+49(0)#### #####", 12 | "0##########", 13 | "0#########", 14 | "0#### ######", 15 | "0#### #####", 16 | "(0####) ######", 17 | "(0####) #####", 18 | ) 19 | -------------------------------------------------------------------------------- /faker/providers/phone_number/de_LI/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | # https://en.wikipedia.org/wiki/Telephone_numbers_in_Liechtenstein 6 | formats = ("%## ## ##", "+423 %## ## ##") 7 | -------------------------------------------------------------------------------- /faker/providers/phone_number/de_LU/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | # https://de.wikipedia.org/wiki/Telefonvorwahl_(Luxemburg) 6 | formats = ( 7 | "22 ## ##", 8 | "23 ## ##", 9 | "24 $# ## ##", 10 | "25 ## ##", 11 | "26 $# ## ##", 12 | "27 $# ## ##", 13 | "28 ## ##", 14 | "29 ## ##", 15 | "3# ## ##", 16 | "4 ### ##", 17 | "71 ## ##", 18 | "72 ## ##", 19 | "74 ## ##", 20 | "75 ## ##", 21 | "76 ## ##", 22 | "78 ## ##", 23 | "80 ## ##", 24 | "81 ## ##", 25 | "83 ## ##", 26 | "87 ## ##", 27 | "88 ## ##", 28 | "89 ## ##", 29 | "92 ## ##", 30 | "95 ## ##", 31 | "99 ## ##", 32 | ) 33 | 34 | prefixes = ("+352 ", "") 35 | 36 | def phone_number(self) -> str: 37 | return self.random_element(self.prefixes) + self.numerify(self.random_element(self.formats)) 38 | -------------------------------------------------------------------------------- /faker/providers/phone_number/el_GR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | "69########", 7 | "69## ######", 8 | "69## ### ###", 9 | "210#######", 10 | "210 #######", 11 | "210 ### ####", 12 | "2##0######", 13 | "2##0 ######", 14 | "2##0 ### ###", 15 | "2###0#####", 16 | "2###0 ## ###", 17 | "(+30) 69## ######", 18 | "+30 69## ######", 19 | "+3069########", 20 | "(+30) 2### ######", 21 | "+30 2### ######", 22 | "+302#########", 23 | ) 24 | -------------------------------------------------------------------------------- /faker/providers/phone_number/en_CA/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | "%##-###-####", 7 | "%##.###.####", 8 | "%## ### ####", 9 | "(%##) ###-####", 10 | "1-%##-###-####", 11 | "1 (%##) ###-####", 12 | "+1 (%##) ###-####", 13 | "%##-###-#### x###", 14 | "(%##) ###-#### x###", 15 | ) 16 | -------------------------------------------------------------------------------- /faker/providers/phone_number/en_IN/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | "+91##########", 7 | "0##########", 8 | "##########", 9 | ) 10 | -------------------------------------------------------------------------------- /faker/providers/phone_number/es_CO/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = [ 6 | "%######", 7 | "60%%######", 8 | "5760%%######", 9 | "+5760%%######", 10 | "(+57)60%%######", 11 | "%## ## ##", 12 | "60% %## ## ##", 13 | "57 60% %## ## ##", 14 | "+57 60% %## ## ##", 15 | "(+57) 60% %## ## ##", 16 | "30########", 17 | "5730########", 18 | "+5730########", 19 | "(+57)30########", 20 | "30# ### ## ##", 21 | "57 30# ### ## ##", 22 | "+57 30# ### ## ##", 23 | "(+57) 30# ### ## ##", 24 | "31########", 25 | "5731########", 26 | "+5731########", 27 | "(+57)31########", 28 | "31# ### ## ##", 29 | "57 31# ### ## ##", 30 | "+57 31# ### ## ##", 31 | "(+57) 31# ### ## ##", 32 | "32########", 33 | "5732########", 34 | "+5732########", 35 | "(+57)32########", 36 | "32# ### ## ##", 37 | "57 32# ### ## ##", 38 | "+57 32# ### ## ##", 39 | "(+57) 32# ### ## ##", 40 | "01800#######", 41 | "01 800# ### ###", 42 | ] 43 | -------------------------------------------------------------------------------- /faker/providers/phone_number/es_MX/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | "+##(#)##########", 7 | "+##(#)##########", 8 | "0##########", 9 | "0##########", 10 | "###-###-####", 11 | "(###)###-####", 12 | "1-###-###-####", 13 | "###.###.####", 14 | "###-###-####", 15 | "(###)###-####", 16 | "1-###-###-####", 17 | "###.###.####", 18 | "###-###-####x###", 19 | "(###)###-####x###", 20 | "1-###-###-####x###", 21 | "###.###.####x###", 22 | "###-###-####x####", 23 | "(###)###-####x####", 24 | "1-###-###-####x####", 25 | "###.###.####x####", 26 | "###-###-####x#####", 27 | "(###)###-####x#####", 28 | "1-###-###-####x#####", 29 | "###.###.####x#####", 30 | ) 31 | -------------------------------------------------------------------------------- /faker/providers/phone_number/fi_FI/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | "+358 ## #######", 7 | "+358 #########", 8 | "+358#########", 9 | "(+358) #########", 10 | "0#########", 11 | "0## ### ####", 12 | ) 13 | -------------------------------------------------------------------------------- /faker/providers/phone_number/fil_PH/__init__.py: -------------------------------------------------------------------------------- 1 | from ..en_PH import Provider as EnPhPhoneNumberProvider 2 | 3 | 4 | class Provider(EnPhPhoneNumberProvider): 5 | """No difference from Phone Number Provider for en_PH locale""" 6 | 7 | pass 8 | -------------------------------------------------------------------------------- /faker/providers/phone_number/fr_CH/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | # source: https://de.wikipedia.org/wiki/Telefonnummer_(Schweiz)#Schreibweisen 7 | "+41 2# ### ## ##", 8 | "+41 3# ### ## ##", 9 | "+41 4# ### ## ##", 10 | "+41 5# ### ## ##", 11 | "+41 6# ### ## ##", 12 | "+41 7# ### ## ##", 13 | "+41 8# ### ## ##", 14 | "+41 9# ### ## ##", 15 | "+41 (0)2# ### ## ##", 16 | "+41 (0)3% ### ## ##", 17 | "+41 (0)4% ### ## ##", 18 | "+41 (0)5# ### ## ##", 19 | "+41 (0)6# ### ## ##", 20 | "+41 (0)7% ### ## ##", 21 | "+41 (0)8# ### ## ##", 22 | "+41 (0)9# ### ## ##", 23 | "02# ### ## ##", 24 | "03% ### ## ##", 25 | "04% ### ## ##", 26 | "05# ### ## ##", 27 | "06# ### ## ##", 28 | "07% ### ## ##", 29 | "08# ### ## ##", 30 | "09# ### ## ##", 31 | # see: http://www.bakom.admin.ch/themen/telekom/00479/00607/index.html 32 | "084# ### ###", 33 | "0878 ### ###", 34 | "0900 ### ###", 35 | "0901 ### ###", 36 | "0906 ### ###", 37 | ) 38 | -------------------------------------------------------------------------------- /faker/providers/phone_number/he_IL/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | "02#######", 7 | "02-####-###", 8 | "03#######", 9 | "03-####-###", 10 | "04#######", 11 | "04-####-###", 12 | "08#######", 13 | "08-####-###", 14 | "09#######", 15 | "09-####-###", 16 | "05#-###-####", 17 | "05# ###-####", 18 | "05# ### ####", 19 | "05#-#######", 20 | "05# #######", 21 | "05########", 22 | ) 23 | -------------------------------------------------------------------------------- /faker/providers/phone_number/hi_IN/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | "+91 ##########", 7 | "+91 ### #######", 8 | "0##-########", 9 | "0##########", 10 | "0#### ######", 11 | ) 12 | -------------------------------------------------------------------------------- /faker/providers/phone_number/hr_HR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | "01 #### ###", 7 | "020 ### ###", 8 | "021 ### ###", 9 | "022 ### ###", 10 | "023 ### ###", 11 | "031 ### ###", 12 | "032 ### ###", 13 | "033 ### ###", 14 | "034 ### ###", 15 | "035 ### ###", 16 | "040 ### ###", 17 | "042 ### ###", 18 | "043 ### ###", 19 | "044 ### ###", 20 | "047 ### ###", 21 | "048 ### ###", 22 | "049 ### ###", 23 | "051 ### ###", 24 | "052 ### ###", 25 | "053 ### ###", 26 | "060 ### ###", 27 | "072 ### ###", 28 | "074 ### ###", 29 | "091 #### ###", 30 | "092 #### ###", 31 | "095 #### ###", 32 | "097 #### ###", 33 | "098 #### ###", 34 | "099 #### ###", 35 | "0800 ## ##", 36 | ) 37 | -------------------------------------------------------------------------------- /faker/providers/phone_number/hu_HU/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | "+36 ## ###-####", 7 | "(06)##/###-####", 8 | "(##)/###-####", 9 | "##/###-####", 10 | "##/### ####", 11 | "06-#/### ####", 12 | "06-##/### ####", 13 | ) 14 | -------------------------------------------------------------------------------- /faker/providers/phone_number/hy_AM/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | # Source: https://en.wikipedia.org/wiki/Telephone_numbers_in_Armenia 6 | formats = ( 7 | "2##-#####", 8 | "3##-#####", 9 | "(2##) #####", 10 | "(3##) #####", 11 | "2##.#####", 12 | "3##.#####", 13 | "10-######", 14 | "(10) ######", 15 | "10.######", 16 | "9#-######", 17 | "(9#) ######", 18 | "9#.######", 19 | ) 20 | -------------------------------------------------------------------------------- /faker/providers/phone_number/id_ID/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | # Currently this is my own work 6 | formats = ( 7 | "+62-##-###-####", 8 | "+62-0##-###-####", 9 | "+62 (0##) ### ####", 10 | "+62 (0##) ###-####", 11 | "+62 (##) ### ####", 12 | "+62 (##) ###-####", 13 | "+62-###-###-####", 14 | "+62-0###-###-####", 15 | "+62 (0###) ### ####", 16 | "+62 (0###) ###-####", 17 | "+62 (###) ### ####", 18 | "+62 (###) ###-####", 19 | "(0##) ### ####", 20 | "(0##) ###-####", 21 | "(0###) ### ####", 22 | "(0###) ###-####", 23 | "08# ### ####", 24 | "08########", 25 | ) 26 | -------------------------------------------------------------------------------- /faker/providers/phone_number/it_CH/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | # source: https://de.wikipedia.org/wiki/Telefonnummer_(Schweiz)#Schreibweisen 7 | "+41 2# ### ## ##", 8 | "+41 3# ### ## ##", 9 | "+41 4# ### ## ##", 10 | "+41 5# ### ## ##", 11 | "+41 6# ### ## ##", 12 | "+41 7# ### ## ##", 13 | "+41 8# ### ## ##", 14 | "+41 9# ### ## ##", 15 | "+41 (0)2# ### ## ##", 16 | "+41 (0)3% ### ## ##", 17 | "+41 (0)4% ### ## ##", 18 | "+41 (0)5# ### ## ##", 19 | "+41 (0)6# ### ## ##", 20 | "+41 (0)7% ### ## ##", 21 | "+41 (0)8# ### ## ##", 22 | "+41 (0)9# ### ## ##", 23 | "02# ### ## ##", 24 | "03% ### ## ##", 25 | "04% ### ## ##", 26 | "05# ### ## ##", 27 | "06# ### ## ##", 28 | "07% ### ## ##", 29 | "08# ### ## ##", 30 | "09# ### ## ##", 31 | # see: http://www.bakom.admin.ch/themen/telekom/00479/00607/index.html 32 | "084# ### ###", 33 | "0878 ### ###", 34 | "0900 ### ###", 35 | "0901 ### ###", 36 | "0906 ### ###", 37 | ) 38 | -------------------------------------------------------------------------------- /faker/providers/phone_number/ja_JP/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | "070-####-####", 7 | "080-####-####", 8 | "090-####-####", 9 | "##-####-####", 10 | ) 11 | -------------------------------------------------------------------------------- /faker/providers/phone_number/ka_GE/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | # Sourse: https://en.wikipedia.org/wiki/Telephone_numbers_in_Georgia_(country) 6 | formats = ( 7 | "+995 ### ### ###", 8 | "+995 (###) ### ###", 9 | "+995#########", 10 | "0 ### ### ###", 11 | "+995 32 ### ## ##", 12 | "+995 34# ### ###", 13 | "+995 (34#) ### ###", 14 | "0 32 ### ## ##", 15 | "0 34# ### ###", 16 | ) 17 | -------------------------------------------------------------------------------- /faker/providers/phone_number/ko_KR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | "02-####-####", 7 | "031-###-####", 8 | "032-###-####", 9 | "033-###-####", 10 | "041-###-####", 11 | "042-###-####", 12 | "043-###-####", 13 | "044-###-####", 14 | "051-###-####", 15 | "052-###-####", 16 | "053-###-####", 17 | "054-###-####", 18 | "055-###-####", 19 | "061-###-####", 20 | "062-###-####", 21 | "063-###-####", 22 | "064-7##-####", 23 | "010-####-####", 24 | "011-###-####", 25 | "016-###-####", 26 | "017-###-####", 27 | "018-###-####", 28 | "019-###-####", 29 | "070-####-####", 30 | ) 31 | -------------------------------------------------------------------------------- /faker/providers/phone_number/lt_LT/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | "+370 ########", 7 | "+(370) ########", 8 | "+370########", 9 | ) 10 | -------------------------------------------------------------------------------- /faker/providers/phone_number/lv_LV/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | "+371 ########", 7 | "+(371) ########", 8 | "+371########", 9 | ) 10 | -------------------------------------------------------------------------------- /faker/providers/phone_number/ne_NP/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | "+977 ##########", 7 | "+977 ### #######", 8 | "984#######", 9 | "985#######", 10 | "980#######", 11 | ) 12 | -------------------------------------------------------------------------------- /faker/providers/phone_number/nl_BE/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | "0### ######", 7 | "0## #######", 8 | "+32### ######", 9 | "+32## #######", 10 | "+32(0)### ######", 11 | "+32(0)## #######", 12 | "(0###) ######", 13 | "(0##) #######", 14 | "0###-######", 15 | "0##-#######", 16 | "+32###-######", 17 | "+32##-#######", 18 | "+32(0)###-######", 19 | "+32(0)##-#######", 20 | "(0###)-######", 21 | "(0##)-#######", 22 | "0#/ ### ## ##", 23 | "0# ### ## ##", 24 | ) 25 | -------------------------------------------------------------------------------- /faker/providers/phone_number/nl_NL/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | "0### ######", 7 | "0## #######", 8 | "+31### ######", 9 | "+31## #######", 10 | "+31(0)### ######", 11 | "+31(0)## #######", 12 | "(0###) ######", 13 | "(0##) #######", 14 | "0###-######", 15 | "0##-#######", 16 | "+31###-######", 17 | "+31##-#######", 18 | "+31(0)###-######", 19 | "+31(0)##-#######", 20 | "(0###)-######", 21 | "(0##)-#######", 22 | ) 23 | -------------------------------------------------------------------------------- /faker/providers/phone_number/no_NO/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | "+47########", 7 | "+47 ## ## ## ##", 8 | "## ## ## ##", 9 | "## ## ## ##", 10 | "########", 11 | "########", 12 | "9## ## ###", 13 | "4## ## ###", 14 | "9#######", 15 | "4#######", 16 | ) 17 | -------------------------------------------------------------------------------- /faker/providers/phone_number/pl_PL/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | # Mobile 7 | # Government website: http://www.uke.gov.pl/numeracja-843 8 | "50# ### ###", 9 | "51# ### ###", 10 | "53# ### ###", 11 | "57# ### ###", 12 | "60# ### ###", 13 | "66# ### ###", 14 | "69# ### ###", 15 | "72# ### ###", 16 | "73# ### ###", 17 | "78# ### ###", 18 | "79# ### ###", 19 | "88# ### ###", 20 | "+48 50# ### ###", 21 | "+48 51# ### ###", 22 | "+48 53# ### ###", 23 | "+48 57# ### ###", 24 | "+48 60# ### ###", 25 | "+48 66# ### ###", 26 | "+48 69# ### ###", 27 | "+48 72# ### ###", 28 | "+48 73# ### ###", 29 | "+48 78# ### ###", 30 | "+48 79# ### ###", 31 | "+48 88# ### ###", 32 | "32 ### ## ##", 33 | "+48 32 ### ## ##", 34 | "22 ### ## ##", 35 | "+48 22 ### ## ##", 36 | ) 37 | -------------------------------------------------------------------------------- /faker/providers/phone_number/pt_PT/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | "(351) 91# ### ###", 7 | "(351) 92# ### ###", 8 | "(351) 93# ### ###", 9 | "(351) 96# ### ###", 10 | "(351) 2## ### ###", 11 | "(351) 91#######", 12 | "(351) 92#######", 13 | "(351) 93#######", 14 | "(351) 96#######", 15 | "(351) 2########", 16 | "(351) 91# ### ###", 17 | "(351) 92# ### ###", 18 | "(351) 93# ### ###", 19 | "(351) 96# ### ###", 20 | "(351) 2## ### ###", 21 | "(351) 91#######", 22 | "(351) 92#######", 23 | "(351) 93#######", 24 | "(351) 96#######", 25 | "(351) 2########", 26 | "+35191#######", 27 | "+35192#######", 28 | "+35193#######", 29 | "+35196#######", 30 | "+3512########", 31 | "91# ### ###", 32 | "92# ### ###", 33 | "93# ### ###", 34 | "96# ### ###", 35 | "2## ### ###", 36 | "91#######", 37 | "92#######", 38 | "93#######", 39 | "96#######", 40 | "2########", 41 | ) 42 | -------------------------------------------------------------------------------- /faker/providers/phone_number/ru_RU/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | "+7 ### ### ####", 7 | "+7 ### ### ## ##", 8 | "+7 (###) ###-##-##", 9 | "+7 (###) ###-####", 10 | "+7##########", 11 | "8 ### ### ####", 12 | "8 ### ### ## ##", 13 | "8 (###) ###-##-##", 14 | "8 (###) ###-####", 15 | "8##########", 16 | ) 17 | -------------------------------------------------------------------------------- /faker/providers/phone_number/sk_SK/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | # pattern I. 7 | "00421 2 ########", 8 | "+421 2 ########", 9 | # patter II. 10 | "00421 3# ### ####", 11 | "00421 4# ### ####", 12 | "00421 5# ### ####", 13 | "+421 3# ### ####", 14 | "+421 4# ### ####", 15 | "+421 5# ### ####", 16 | # pattern III. 17 | "00421 90# ### ###", 18 | "00421 91# ### ###", 19 | "00421 940 ### ###", 20 | "00421 944 ### ###", 21 | "00421 948 ### ###", 22 | "00421 949 ### ###", 23 | "+421 90# ### ###", 24 | "+421 91# ### ###", 25 | "+421 940 ### ###", 26 | "+421 944 ### ###", 27 | "+421 948 ### ###", 28 | "+421 949 ### ###", 29 | ) 30 | -------------------------------------------------------------------------------- /faker/providers/phone_number/sl_SI/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | "040 ### ###", 7 | "041 ### ###", 8 | "031 ### ###", 9 | "030 ### ###", 10 | "070 ### ###", 11 | "01 #### ###", 12 | "02 #### ###", 13 | "04 #### ###", 14 | "05 #### ###", 15 | "06 #### ###", 16 | "08 #### ###", 17 | ) 18 | -------------------------------------------------------------------------------- /faker/providers/phone_number/sv_SE/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | "+46 (0)8 ### ### ##", 7 | "+46 (0)## ## ## ##", 8 | "+46 (0)### ### ##", 9 | "08-### ### ##", 10 | "08-### ## ##", 11 | "08-## ## ##", 12 | "0##-### ## ##", 13 | "0##-## ## ##", 14 | "0###-## ## ##", 15 | "0###-### ##", 16 | ) 17 | -------------------------------------------------------------------------------- /faker/providers/phone_number/ta_IN/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | "+91 ##########", 7 | "+91 ### #######", 8 | "0##-########", 9 | "0##########", 10 | "0#### ######", 11 | ) 12 | -------------------------------------------------------------------------------- /faker/providers/phone_number/tl_PH/__init__.py: -------------------------------------------------------------------------------- 1 | from ..en_PH import Provider as EnPhPhoneNumberProvider 2 | 3 | 4 | class Provider(EnPhPhoneNumberProvider): 5 | """No difference from Phone Number Provider for en_PH locale""" 6 | 7 | pass 8 | -------------------------------------------------------------------------------- /faker/providers/phone_number/tr_TR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | "+90(###)#######", 7 | "+90 (###) #######", 8 | "0### ### ## ##", 9 | "0##########", 10 | "0###-### ####", 11 | "(###)### ####", 12 | "### # ###", 13 | "+90(###)###-####x###", 14 | "+90(###)###-####x####", 15 | ) 16 | -------------------------------------------------------------------------------- /faker/providers/phone_number/tw_GH/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | "+23327#######", 7 | "+23357#######", 8 | "+23355#######", 9 | "+23324#######", 10 | "+23354#######", 11 | "+23320#######", 12 | "+23350#######", 13 | "+23326#######", 14 | "+23356#######", 15 | "+23328#######", 16 | "024#######", 17 | "054#######", 18 | "055#######", 19 | "027#######", 20 | "057#######", 21 | "020#######", 22 | "050#######", 23 | "026#######", 24 | "056#######", 25 | "028#######", 26 | ) 27 | -------------------------------------------------------------------------------- /faker/providers/phone_number/uz_UZ/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | formats = ( 6 | "+998 (##) ###-##-##", 7 | "+998 (##) ### ## ##", 8 | "+998 (##) ### ####", 9 | "+998 (##) ###-####", 10 | "+998 ## ###-##-##", 11 | "+998 ## ### ## ##", 12 | "+998 ## ### ####", 13 | "+998 ## ###-####", 14 | "+998#########", 15 | ) 16 | -------------------------------------------------------------------------------- /faker/providers/phone_number/vi_VN/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | """Implement phone_number provider for ``vi_VN`` locale. 6 | # Source : https://vi.wikipedia.org/wiki/M%C3%A3_%C4%91i%E1%BB%87n_tho%E1%BA%A1i_Vi%E1%BB%87t_Nam 7 | """ 8 | 9 | formats = ( 10 | "+84 ## #######", 11 | "(0#) #### ####", 12 | "0# #### ####", 13 | "0# #######", 14 | "+84-##-######", 15 | "+84-##-### ####", 16 | "(0#)###-####", 17 | ) 18 | -------------------------------------------------------------------------------- /faker/providers/phone_number/zh_CN/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | 4 | class Provider(PhoneNumberProvider): 5 | phonenumber_prefixes = [ 6 | 134, 7 | 135, 8 | 136, 9 | 137, 10 | 138, 11 | 139, 12 | 147, 13 | 150, 14 | 151, 15 | 152, 16 | 157, 17 | 158, 18 | 159, 19 | 182, 20 | 187, 21 | 188, 22 | 130, 23 | 131, 24 | 132, 25 | 145, 26 | 155, 27 | 156, 28 | 185, 29 | 186, 30 | 145, 31 | 133, 32 | 153, 33 | 180, 34 | 181, 35 | 189, 36 | ] 37 | formats = [str(i) + "########" for i in phonenumber_prefixes] 38 | 39 | def phonenumber_prefix(self) -> int: 40 | return self.random_element(self.phonenumber_prefixes) 41 | -------------------------------------------------------------------------------- /faker/providers/phone_number/zh_TW/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PhoneNumberProvider 2 | 3 | # phone number from https://en.wikipedia.org/wiki/Telephone_numbers_in_Taiwan 4 | 5 | 6 | class Provider(PhoneNumberProvider): 7 | formats = ( 8 | "(0#) %#######", 9 | "0#-%#######", 10 | "0## %#######", 11 | "09########", 12 | "09##-######", 13 | "0#-%######", 14 | "0# %######", 15 | ) 16 | -------------------------------------------------------------------------------- /faker/providers/profile/en_US/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as ProfileProvider # pragma: no cover 2 | 3 | 4 | class Provider(ProfileProvider): # pragma: no cover 5 | pass 6 | -------------------------------------------------------------------------------- /faker/providers/python/en_US/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as PythonProvider # pragma: no cover 2 | 3 | 4 | class Provider(PythonProvider): # pragma: no cover 5 | pass 6 | -------------------------------------------------------------------------------- /faker/providers/sbn/en_US/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as SBNProvider 2 | 3 | 4 | class Provider(SBNProvider): 5 | pass 6 | -------------------------------------------------------------------------------- /faker/providers/sbn/rules.py: -------------------------------------------------------------------------------- 1 | """ 2 | This module exists solely to figure how long a registrant/publication 3 | number may be within an SBN. It's the same as the ISBN implementation 4 | for ean 978, reg_group 0. 5 | """ 6 | 7 | from collections import namedtuple 8 | from typing import List 9 | 10 | RegistrantRule = namedtuple("RegistrantRule", ["min", "max", "registrant_length"]) 11 | 12 | # Structure: RULES = [Rule1, Rule2, ...] 13 | RULES: List[RegistrantRule] = [ 14 | RegistrantRule("0000000", "1999999", 2), 15 | RegistrantRule("2000000", "2279999", 3), 16 | RegistrantRule("2280000", "2289999", 4), 17 | RegistrantRule("2290000", "6479999", 3), 18 | RegistrantRule("6480000", "6489999", 7), 19 | RegistrantRule("6490000", "6999999", 3), 20 | RegistrantRule("7000000", "8499999", 4), 21 | RegistrantRule("8500000", "8999999", 5), 22 | RegistrantRule("9000000", "9499999", 6), 23 | RegistrantRule("9500000", "9999999", 7), 24 | ] 25 | -------------------------------------------------------------------------------- /faker/providers/ssn/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import BaseProvider, ElementsType 2 | 3 | localized = True 4 | 5 | 6 | class Provider(BaseProvider): 7 | ssn_formats: ElementsType[str] = ("###-##-####",) 8 | 9 | def ssn(self) -> str: 10 | return self.bothify(self.random_element(self.ssn_formats)) 11 | -------------------------------------------------------------------------------- /faker/providers/ssn/az_AZ/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as SsnProvider 2 | 3 | 4 | class Provider(SsnProvider): 5 | # The FIN code consists of 7 characters (letters and numbers of the English alphabet, 6 | # except for the letters "I" and "O"). 7 | 8 | characters = [ 9 | "A", 10 | "B", 11 | "C", 12 | "D", 13 | "E", 14 | "F", 15 | "G", 16 | "H", 17 | "J", 18 | "K", 19 | "L", 20 | "M", 21 | "N", 22 | "P", 23 | "Q", 24 | "R", 25 | "S", 26 | "T", 27 | "U", 28 | "V", 29 | "W", 30 | "X", 31 | "Y", 32 | "Z", 33 | ] 34 | numbers = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] 35 | all_characters = characters + numbers 36 | 37 | def ssn(self) -> str: 38 | ssn = "".join(self.random_elements(elements=self.all_characters, length=7)) 39 | return ssn 40 | -------------------------------------------------------------------------------- /faker/providers/ssn/bg_BG/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BaseProvider 2 | 3 | 4 | class Provider(BaseProvider): 5 | """ 6 | A Faker provider for the Bulgarian VAT IDs 7 | """ 8 | 9 | vat_id_formats = ( 10 | "BG#########", 11 | "BG##########", 12 | ) 13 | 14 | def vat_id(self) -> str: 15 | """ 16 | http://ec.europa.eu/taxation_customs/vies/faq.html#item_11 17 | :return: A random Bulgarian VAT ID 18 | """ 19 | 20 | return self.bothify(self.random_element(self.vat_id_formats)) 21 | -------------------------------------------------------------------------------- /faker/providers/ssn/bn_BD/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as SsnProvider 2 | 3 | 4 | class Provider(SsnProvider): 5 | """ 6 | Implement SSN provider for ``bn_BD`` locale. 7 | National ID Card Number is considered the SSN number for 8 | Bangladeshi people. 9 | :example: '1882824588423' 10 | """ 11 | 12 | ssn_formats = ( 13 | "%############", 14 | "%## ### ####", 15 | ) 16 | -------------------------------------------------------------------------------- /faker/providers/ssn/de_CH/__init__.py: -------------------------------------------------------------------------------- 1 | from ..fr_CH import Provider as BaseProvider 2 | 3 | 4 | class Provider(BaseProvider): 5 | pass 6 | -------------------------------------------------------------------------------- /faker/providers/ssn/dk_DK/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BaseProvider 2 | 3 | 4 | class Provider(BaseProvider): 5 | """ 6 | A Faker provider for the Danish VAT IDs 7 | """ 8 | 9 | vat_id_formats = ("DK########",) 10 | 11 | def vat_id(self) -> str: 12 | """ 13 | Returns a random generated Danish Tax ID 14 | """ 15 | 16 | return self.bothify(self.random_element(self.vat_id_formats)) 17 | -------------------------------------------------------------------------------- /faker/providers/ssn/el_CY/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BaseProvider 2 | 3 | 4 | class Provider(BaseProvider): 5 | """ 6 | A Faker provider for the Cypriot VAT IDs 7 | """ 8 | 9 | vat_id_formats = ("CY#########?",) 10 | 11 | def vat_id(self) -> str: 12 | """ 13 | Returns a random generated Cypriot Tax ID 14 | """ 15 | 16 | return self.bothify(self.random_element(self.vat_id_formats)) 17 | -------------------------------------------------------------------------------- /faker/providers/ssn/en_IE/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BaseProvider 2 | 3 | 4 | class Provider(BaseProvider): 5 | """ 6 | A Faker provider for the Irish VAT IDs 7 | """ 8 | 9 | vat_id_formats = ( 10 | "IE#?#####?", 11 | "IE#######?", 12 | "IE#######??", 13 | ) 14 | 15 | def vat_id(self) -> str: 16 | """ 17 | http://ec.europa.eu/taxation_customs/vies/faq.html#item_11 18 | :return: a random Irish VAT ID 19 | """ 20 | 21 | return self.bothify(self.random_element(self.vat_id_formats)) 22 | -------------------------------------------------------------------------------- /faker/providers/ssn/en_IN/__init__.py: -------------------------------------------------------------------------------- 1 | from faker.utils import checksums 2 | 3 | from .. import Provider as BaseProvider 4 | 5 | 6 | class Provider(BaseProvider): 7 | """ 8 | Faker provider for Indian Identifiers 9 | """ 10 | 11 | aadhaar_id_formats = ("%##########",) 12 | 13 | def aadhaar_id(self) -> str: 14 | """ 15 | Aadhaar is a 12 digit person identifier generated for residents of 16 | India. 17 | Details: https://en.wikipedia.org/wiki/Aadhaar 18 | Official Website: https://uidai.gov.in/my-aadhaar/about-your-aadhaar.html 19 | """ 20 | 21 | aadhaar_digits = self.numerify(self.random_element(self.aadhaar_id_formats)) 22 | checksum = checksums.calculate_luhn(int(aadhaar_digits)) 23 | 24 | aadhaar_number = f"{aadhaar_digits}{checksum}" 25 | 26 | return aadhaar_number 27 | -------------------------------------------------------------------------------- /faker/providers/ssn/es_CA/__init__.py: -------------------------------------------------------------------------------- 1 | from ..es_ES import Provider as BaseProvider 2 | 3 | 4 | class Provider(BaseProvider): 5 | """ 6 | A Faker provider for the Spanish VAT IDs and DOIs 7 | """ 8 | 9 | pass 10 | -------------------------------------------------------------------------------- /faker/providers/ssn/fil_PH/__init__.py: -------------------------------------------------------------------------------- 1 | from ..en_PH import Provider as EnPhSsnProvider 2 | 3 | 4 | class Provider(EnPhSsnProvider): 5 | """No difference from SSN Provider for en_PH locale""" 6 | 7 | pass 8 | -------------------------------------------------------------------------------- /faker/providers/ssn/he_IL/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as SsnProvider 2 | 3 | 4 | class Provider(SsnProvider): 5 | def ssn(self) -> str: 6 | """ 7 | Returns an Israeli identity number, known as Teudat Zehut ("tz"). 8 | 9 | https://en.wikipedia.org/wiki/Israeli_identity_card 10 | """ 11 | 12 | newID = str(self.generator.random.randrange(111111, 99999999)) 13 | newID = newID.zfill(8) 14 | theSum = 0 15 | indexRange = [0, 2, 4, 6] 16 | for i in indexRange: 17 | digit = newID[i] 18 | num = int(digit) 19 | theSum = theSum + num 20 | num = int(newID[i + 1]) * 2 21 | if num > 9: 22 | num = int(str(num)[0]) + int(str(num)[1]) 23 | theSum = theSum + num 24 | lastDigit = theSum % 10 25 | if lastDigit != 0: 26 | lastDigit = 10 - lastDigit 27 | 28 | return str(newID) + str(lastDigit) 29 | -------------------------------------------------------------------------------- /faker/providers/ssn/ko_KR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as SsnProvider 2 | 3 | 4 | class Provider(SsnProvider): 5 | ssn_formats = ( 6 | "##0#0#-1######", 7 | "##0#1#-1######", 8 | "##0#2#-1######", 9 | "##0#0#-2######", 10 | "##0#1#-2######", 11 | "##0#2#-2######", 12 | ) 13 | -------------------------------------------------------------------------------- /faker/providers/ssn/lb_LU/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BaseProvider 2 | 3 | 4 | class Provider(BaseProvider): 5 | """ 6 | A Faker provider for the Luxembourgish VAT IDs 7 | """ 8 | 9 | vat_id_formats = ("LU########",) 10 | 11 | def vat_id(self) -> str: 12 | """ 13 | http://ec.europa.eu/taxation_customs/vies/faq.html#item_11 14 | :return: a random Luxembourgish VAT ID 15 | """ 16 | 17 | return self.bothify(self.random_element(self.vat_id_formats)) 18 | -------------------------------------------------------------------------------- /faker/providers/ssn/lt_LT/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BaseProvider 2 | 3 | 4 | class Provider(BaseProvider): 5 | """ 6 | A Faker provider for the Lithuanian VAT IDs 7 | """ 8 | 9 | vat_id_formats = ( 10 | "LT#########", 11 | "LT############", 12 | ) 13 | 14 | def vat_id(self) -> str: 15 | """ 16 | http://ec.europa.eu/taxation_customs/vies/faq.html#item_11 17 | :return: a random Lithuanian VAT ID 18 | """ 19 | 20 | return self.bothify(self.random_element(self.vat_id_formats)) 21 | -------------------------------------------------------------------------------- /faker/providers/ssn/mt_MT/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BaseProvider 2 | 3 | 4 | class Provider(BaseProvider): 5 | """ 6 | A Faker provider for the Maltese VAT IDs 7 | """ 8 | 9 | vat_id_formats = ("MT########",) 10 | 11 | def vat_id(self) -> str: 12 | """ 13 | http://ec.europa.eu/taxation_customs/vies/faq.html#item_11 14 | :return: A random Maltese VAT ID 15 | """ 16 | 17 | return self.bothify(self.random_element(self.vat_id_formats)) 18 | -------------------------------------------------------------------------------- /faker/providers/ssn/pt_PT/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BaseProvider 2 | 3 | 4 | class Provider(BaseProvider): 5 | """ 6 | A Faker provider for the Portuguese VAT IDs 7 | """ 8 | 9 | vat_id_formats = ("PT#########",) 10 | 11 | def vat_id(self) -> str: 12 | """ 13 | http://ec.europa.eu/taxation_customs/vies/faq.html#item_11 14 | :return: A random Portuguese VAT ID 15 | """ 16 | 17 | return self.bothify(self.random_element(self.vat_id_formats)) 18 | -------------------------------------------------------------------------------- /faker/providers/ssn/ru_RU/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as SsnProvider 2 | 3 | 4 | class Provider(SsnProvider): 5 | ssn_formats = ("############",) 6 | -------------------------------------------------------------------------------- /faker/providers/ssn/sl_SI/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BaseProvider 2 | 3 | 4 | class Provider(BaseProvider): 5 | """ 6 | A Faker provider for the Slovenian VAT IDs 7 | """ 8 | 9 | vat_id_formats = ("SI########",) 10 | 11 | def vat_id(self) -> str: 12 | """ 13 | http://ec.europa.eu/taxation_customs/vies/faq.html#item_11 14 | :return: a random Slovenian VAT ID 15 | """ 16 | 17 | return self.bothify(self.random_element(self.vat_id_formats)) 18 | -------------------------------------------------------------------------------- /faker/providers/ssn/tl_PH/__init__.py: -------------------------------------------------------------------------------- 1 | from ..en_PH import Provider as EnPhSsnProvider 2 | 3 | 4 | class Provider(EnPhSsnProvider): 5 | """No difference from SSN Provider for en_PH locale""" 6 | 7 | pass 8 | -------------------------------------------------------------------------------- /faker/providers/ssn/tr_TR/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as BaseProvider 2 | 3 | 4 | class Provider(BaseProvider): 5 | # Source: 6 | # Turkey Republic National Number is identity number. 7 | # Identity number contains 11 numbers, 8 | # First number can't be zero 9 | # Eleventh number is result of division after sum first number 10 | 11 | def ssn(self) -> str: 12 | """ 13 | :example: '89340691651' 14 | """ 15 | first_part: int = self.random_element((1, 2, 3, 4, 5, 6, 7, 8, 9)) 16 | middle_part: str = self.bothify("#########") 17 | last_part: int = sum(int(x) for x in f"{first_part}{middle_part}") % 10 18 | return f"{first_part}{middle_part}{last_part}" 19 | -------------------------------------------------------------------------------- /faker/providers/user_agent/en_US/__init__.py: -------------------------------------------------------------------------------- 1 | from .. import Provider as UserAgentProvider # pragma: no cover 2 | 3 | 4 | class Provider(UserAgentProvider): # pragma: no cover 5 | pass 6 | -------------------------------------------------------------------------------- /faker/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joke2k/faker/cfca7ca223cdeac1afeb4c0ed739f6bc7e608e92/faker/py.typed -------------------------------------------------------------------------------- /faker/sphinx/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joke2k/faker/cfca7ca223cdeac1afeb4c0ed739f6bc7e608e92/faker/sphinx/__init__.py -------------------------------------------------------------------------------- /faker/sphinx/autodoc.py: -------------------------------------------------------------------------------- 1 | from faker.sphinx.docstring import ProviderMethodDocstring 2 | from faker.sphinx.documentor import write_provider_docs 3 | 4 | 5 | def _create_source_files(app): 6 | write_provider_docs() 7 | 8 | 9 | def _process_docstring(app, what, name, obj, options, lines): 10 | docstring = ProviderMethodDocstring(app, what, name, obj, options, lines) 11 | if not docstring.skipped: 12 | lines[:] = docstring.lines[:] 13 | 14 | 15 | def setup(app): 16 | app.setup_extension("sphinx.ext.autodoc") 17 | app.connect("builder-inited", _create_source_files) 18 | app.connect("autodoc-process-docstring", _process_docstring) 19 | -------------------------------------------------------------------------------- /faker/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joke2k/faker/cfca7ca223cdeac1afeb4c0ed739f6bc7e608e92/faker/utils/__init__.py -------------------------------------------------------------------------------- /faker/utils/checksums.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def luhn_checksum(number: float) -> int: 5 | def digits_of(n: float) -> List[int]: 6 | return [int(d) for d in str(n)] 7 | 8 | digits = digits_of(number) 9 | odd_digits = digits[-1::-2] 10 | even_digits = digits[-2::-2] 11 | checksum = 0 12 | checksum += sum(odd_digits) 13 | for d in even_digits: 14 | checksum += sum(digits_of(d * 2)) 15 | return checksum % 10 16 | 17 | 18 | def calculate_luhn(partial_number: float) -> int: 19 | """ 20 | Generates the Checksum using Luhn's algorithm 21 | """ 22 | check_digit = luhn_checksum(int(partial_number) * 10) 23 | return check_digit if check_digit == 0 else 10 - check_digit 24 | -------------------------------------------------------------------------------- /faker/utils/datasets.py: -------------------------------------------------------------------------------- 1 | from itertools import chain 2 | 3 | from faker.typing import OrderedDictType 4 | 5 | 6 | def add_ordereddicts(*odicts: OrderedDictType) -> OrderedDictType: 7 | items = [odict.items() for odict in odicts] 8 | return OrderedDictType(chain(*items)) 9 | -------------------------------------------------------------------------------- /faker/utils/decorators.py: -------------------------------------------------------------------------------- 1 | from functools import wraps 2 | from typing import Callable, Dict, Tuple, TypeVar 3 | 4 | from ..utils import text 5 | 6 | T = TypeVar("T") 7 | 8 | 9 | def slugify(fn: Callable) -> Callable: 10 | @wraps(fn) 11 | def wrapper(*args: Tuple[T, ...], **kwargs: Dict[str, T]) -> str: 12 | return text.slugify(fn(*args, **kwargs)) 13 | 14 | return wrapper 15 | 16 | 17 | def slugify_domain(fn: Callable) -> Callable: 18 | @wraps(fn) 19 | def wrapper(*args: Tuple[T, ...], **kwargs: Dict[str, T]) -> str: 20 | return text.slugify(fn(*args, **kwargs), allow_dots=True) 21 | 22 | return wrapper 23 | 24 | 25 | def slugify_unicode(fn: Callable) -> Callable: 26 | @wraps(fn) 27 | def wrapper(*args: Tuple[T, ...], **kwargs: Dict[str, T]) -> str: 28 | return text.slugify(fn(*args, **kwargs), allow_unicode=True) 29 | 30 | return wrapper 31 | 32 | 33 | def lowercase(fn: Callable) -> Callable: 34 | @wraps(fn) 35 | def wrapper(*args: Tuple[T, ...], **kwargs: Dict[str, T]) -> str: 36 | return fn(*args, **kwargs).lower() 37 | 38 | return wrapper 39 | -------------------------------------------------------------------------------- /faker/utils/text.py: -------------------------------------------------------------------------------- 1 | import re 2 | import unicodedata 3 | 4 | from typing import Pattern 5 | 6 | _re_pattern: Pattern = re.compile(r"[^\w\s-]", flags=re.U) 7 | _re_pattern_allow_dots: Pattern = re.compile(r"[^\.\w\s-]", flags=re.U) 8 | _re_spaces: Pattern = re.compile(r"[-\s]+", flags=re.U) 9 | 10 | 11 | def slugify(value: str, allow_dots: bool = False, allow_unicode: bool = False) -> str: 12 | """ 13 | Converts to lowercase, removes non-word characters (alphanumerics and 14 | underscores) and converts spaces to hyphens. Also strips leading and 15 | trailing whitespace. Modified to optionally allow dots. 16 | 17 | Adapted from Django 1.9 18 | """ 19 | pattern: Pattern = _re_pattern_allow_dots if allow_dots else _re_pattern 20 | 21 | value = str(value) 22 | if allow_unicode: 23 | value = unicodedata.normalize("NFKC", value) 24 | value = pattern.sub("", value).strip().lower() 25 | return _re_spaces.sub("-", value) 26 | value = unicodedata.normalize("NFKD", value).encode("ascii", "ignore").decode("ascii") 27 | value = pattern.sub("", value).strip().lower() 28 | return _re_spaces.sub("-", value) 29 | -------------------------------------------------------------------------------- /mypy.ini: -------------------------------------------------------------------------------- 1 | [mypy] 2 | disallow_subclassing_any = True 3 | disallow_incomplete_defs = True 4 | check_untyped_defs = True 5 | warn_redundant_casts = True 6 | warn_unused_ignores = False 7 | allow_redefinition = True 8 | pretty = True 9 | follow_imports=silent 10 | ignore_missing_imports = True 11 | show_error_codes = True 12 | show_column_numbers = True -------------------------------------------------------------------------------- /readthedocs.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | 3 | build: 4 | os: "ubuntu-22.04" 5 | tools: 6 | python: "3.10" 7 | 8 | python: 9 | install: 10 | - method: pip 11 | path: . 12 | 13 | sphinx: 14 | configuration: docs/conf.py 15 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [metadata] 2 | name = faker 3 | 4 | [pep8] 5 | max-line-length = 80 6 | 7 | [tool:pytest] 8 | addopts = --verbose 9 | python_files = tests/*.py 10 | 11 | [doc8] 12 | ignore-path=.tox,docs/_build,*.egg-info 13 | max-line-length=120 14 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joke2k/faker/cfca7ca223cdeac1afeb4c0ed739f6bc7e608e92/tests/__init__.py -------------------------------------------------------------------------------- /tests/conftest.py: -------------------------------------------------------------------------------- 1 | pytest_plugins = ["pytester"] 2 | -------------------------------------------------------------------------------- /tests/mymodule/__init__.py: -------------------------------------------------------------------------------- 1 | localized = True 2 | -------------------------------------------------------------------------------- /tests/mymodule/en_US/__init__.py: -------------------------------------------------------------------------------- 1 | from faker.providers import BaseProvider 2 | 3 | 4 | class Provider(BaseProvider): 5 | def foo(self): 6 | return "bar" 7 | -------------------------------------------------------------------------------- /tests/providers/conftest.py: -------------------------------------------------------------------------------- 1 | import locale as pylocale 2 | import re 3 | 4 | import pytest 5 | 6 | from faker import Faker 7 | from faker.contrib.pytest.plugin import DEFAULT_SEED 8 | 9 | LOCALE_TEST_CLASS_NAME_REGEX = re.compile( 10 | r"^Test(?P[A-Z][a-z]{1,2})(?P[A-Z][a-z])$", 11 | ) 12 | 13 | 14 | @pytest.fixture(scope="class", autouse=True) 15 | def _class_locale_faker(request): 16 | if not request.cls: 17 | return None 18 | class_name = request.cls.__name__ 19 | match = LOCALE_TEST_CLASS_NAME_REGEX.fullmatch(class_name) 20 | if not match: 21 | return None 22 | locale = f'{match.group("language").lower()}_{match.group("region").upper()}' 23 | locale = pylocale.normalize(locale).split(".")[0] 24 | return Faker(locale=locale) 25 | 26 | 27 | @pytest.fixture(autouse=True) 28 | def faker(_class_locale_faker, faker): 29 | if not _class_locale_faker: 30 | return faker 31 | _class_locale_faker.seed_instance(DEFAULT_SEED) 32 | return _class_locale_faker 33 | 34 | 35 | @pytest.fixture(scope="class", autouse=True) 36 | def num_samples(request): 37 | try: 38 | num = int(request.cls.num_samples) 39 | except AttributeError: 40 | num = 100 41 | return num 42 | -------------------------------------------------------------------------------- /tests/providers/test_doi.py: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | from faker import Faker 4 | 5 | 6 | def test_doi(): 7 | fake = Faker() 8 | 9 | # Test standard DOI 10 | doi = fake.doi() 11 | assert doi.startswith("10.") 12 | # DOI format: 10.{registrant}/{suffix} 13 | assert re.match(r"^10\.\d{4,9}/[a-z0-9]+$", doi) 14 | 15 | 16 | def test_doi_es_ES(): 17 | # Test Spanish locale no longer returns Spanish IDs 18 | fake = Faker("es_ES") 19 | doi = fake.doi() 20 | 21 | # Should follow DOI format, not Spanish ID format 22 | assert doi.startswith("10.") 23 | assert re.match(r"^10\.\d{4,9}/[a-z0-9]+$", doi) 24 | # Make sure it's not returning Spanish IDs 25 | assert not re.match(r"^[XYZ]\d{7}[A-Z]$", doi) # NIE format 26 | assert not re.match(r"^\d{8}[A-Z]$", doi) # NIF format 27 | -------------------------------------------------------------------------------- /tests/providers/test_emoji.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | from faker import Faker 4 | 5 | 6 | class TestGlobal(unittest.TestCase): 7 | """Test emoji provider methods""" 8 | 9 | def setUp(self): 10 | self.fake = Faker() # No locale specified, gets global for this provider 11 | Faker.seed(0) 12 | 13 | def test_emoji(self): 14 | emoji = self.fake.emoji() 15 | assert isinstance(emoji, str) 16 | -------------------------------------------------------------------------------- /tests/providers/test_passport.py: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | from typing import Pattern 4 | 5 | 6 | class TestPassport: 7 | """Test passport provider methods""" 8 | 9 | def test_passport_number(self, faker, num_samples): 10 | for _ in range(num_samples): 11 | passport_number = faker.passport_number() 12 | assert isinstance(passport_number, str) 13 | 14 | 15 | class TestDeAt: 16 | """Test de_AT passport provider methods""" 17 | 18 | def test_passport_number(self, faker, num_samples): 19 | for _ in range(num_samples): 20 | 21 | pattern: Pattern = re.compile(r"[A-Z]{1,2}\d{7}") 22 | passport_number = faker.passport_number() 23 | assert pattern.fullmatch(passport_number) 24 | -------------------------------------------------------------------------------- /tests/pytest/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joke2k/faker/cfca7ca223cdeac1afeb4c0ed739f6bc7e608e92/tests/pytest/__init__.py -------------------------------------------------------------------------------- /tests/pytest/session_overrides/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joke2k/faker/cfca7ca223cdeac1afeb4c0ed739f6bc7e608e92/tests/pytest/session_overrides/__init__.py -------------------------------------------------------------------------------- /tests/pytest/session_overrides/conftest.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | 3 | import pytest 4 | 5 | EXCLUSIVE_SESSION_FLAG = "--exclusive-faker-session" 6 | SKIP_REASON = ( 7 | f"This test is skipped by default since it depends on changes in the behavior of session-scoped fixtures. " 8 | f'Use a separate pytest run for tests like this with the "{EXCLUSIVE_SESSION_FLAG}" flag specified.' 9 | ) 10 | 11 | 12 | def pytest_addoption(parser): 13 | parser.addoption( 14 | EXCLUSIVE_SESSION_FLAG, 15 | action="store_true", 16 | default=False, 17 | help="Allows tests that require an exclusive session to run", 18 | ) 19 | 20 | 21 | def pytest_collection_modifyitems(config, items): 22 | if config.getoption(EXCLUSIVE_SESSION_FLAG): 23 | return 24 | skip_lacks_exclusive_session = pytest.mark.skip(reason=SKIP_REASON) 25 | session_overrides_dir = Path(__file__).resolve().parent 26 | for item in items: 27 | if str(item.fspath).startswith(str(session_overrides_dir)): 28 | item.add_marker(skip_lacks_exclusive_session) 29 | -------------------------------------------------------------------------------- /tests/pytest/session_overrides/session_locale/__init__.py: -------------------------------------------------------------------------------- 1 | _MODULE_LOCALES = ["en_US"] 2 | -------------------------------------------------------------------------------- /tests/pytest/session_overrides/session_locale/conftest.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | 3 | from tests.pytest.session_overrides.session_locale import _MODULE_LOCALES 4 | 5 | 6 | @pytest.fixture(scope="session", autouse=True) 7 | def faker_session_locale(): 8 | return _MODULE_LOCALES 9 | -------------------------------------------------------------------------------- /tests/sphinx/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joke2k/faker/cfca7ca223cdeac1afeb4c0ed739f6bc7e608e92/tests/sphinx/__init__.py -------------------------------------------------------------------------------- /tests/test_decode.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | 3 | from faker.decode import unidecode 4 | 5 | 6 | @pytest.mark.parametrize( 7 | ("text", "result"), 8 | [ 9 | ( 10 | "Programmes de publicité - Solutions d'entreprise", 11 | "Programmes de publicite - Solutions d'entreprise", 12 | ), 13 | ("Транслитерирует и русский", "Transliteriruet i russkii"), 14 | ("kožušček", "kozuscek"), 15 | ("北亰", "Bei Jing "), 16 | ("ij", "ij"), 17 | ], 18 | ) 19 | def test_transliterate(text, result): 20 | assert unidecode(text) == result 21 | 22 | 23 | @pytest.mark.parametrize("code", range(128)) 24 | def test_7bit_purity(code): 25 | ch = chr(code) 26 | assert unidecode(ch) == ch 27 | 28 | 29 | def test_7bit_text_purity(): 30 | txt = "".join([chr(x) for x in range(128)]) 31 | assert unidecode(txt) == txt 32 | 33 | 34 | def test_out_of_bounds(): 35 | assert unidecode("𐀀") == "" 36 | -------------------------------------------------------------------------------- /tests/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joke2k/faker/cfca7ca223cdeac1afeb4c0ed739f6bc7e608e92/tests/utils/__init__.py --------------------------------------------------------------------------------