Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added es_PE person #1844

Closed
wants to merge 11 commits into from
56 changes: 56 additions & 0 deletions faker/providers/bank/es_PE/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
from .. import Provider as BankProvider


class Provider(BankProvider):
# Implement bank provider for 'es_PE' locale.
# Source: <https://www.bcrp.gob.pe/sitios-de-interes/entidades-financieras.html>
bban_format = "????##################"
country_code = "PE"

banks = (
"Banco de la Nación",
"Banco de Comercio",
"Banco de Crédito del Perú",
"Banco Interamericano de Finanzas (BanBif)",
"Banco Pichincha",
"BBVA",
"Citibank Perú",
"Interbank",
"Alfin Banco" "Banco central de Reserva del Perú",
"Scotiabank Perú",
"Banco GNB Perú",
"Banco Falabella",
"Banco Ripley",
"Banco Santander Perú",
"Bank of China",
"Bci Perú",
"ICBC PERU BANK",
"Agrobanco",
)
swift_bank_codes = (
"BANC",
"BDCM",
"BCPL",
"BIFS",
"FINA",
"BCON",
"CITI",
"BINP",
"AIFN",
"CRPE",
"BSUD",
"HBPE",
"BSAP",
"BKCH",
"CRED",
"ICBK",
)
swift_location_codes = ("PL",)
swift_branch_codes = (
"XXX",
"000",
)

def bank(self) -> str:
# Generate a bank name
return self.random_element(self.banks)
16 changes: 16 additions & 0 deletions faker/providers/currency/es_PE/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from ..es import Provider as CurrencyProvider


class Provider(CurrencyProvider):
price_formats = [
"%##",
"%.###",
"%#.##0",
"%##.##0",
"%##.##0",
"%.###.##0",
"%#,##",
]

def pricetag(self) -> str:
return "S/" + self.numerify(self.random_element(self.price_formats))
Loading