faker.providers.bank.ru_RU
¶
Package Contents¶
Classes¶
Implement default bank provider for Faker. |
|
Implement bank provider for |
- class faker.providers.bank.ru_RU.BankProvider(generator: Any)¶
Bases:
faker.providers.BaseProvider
Implement default bank provider for Faker.
Important
Bank codes, account numbers, and other ID’s generated by this provider are only valid in form, i.e. they conform to some standard/format, are of the expected lengths, and have valid checksums (where applicable). Results generated that turn out to be valid in real life are purely coincidental.
Sources:
- swift8(use_dataset: bool = False) str ¶
Generate an 8-digit SWIFT code.
This method uses |swift| under the hood with the
length
argument set to8
and with theprimary
argument omitted. All 8-digit SWIFT codes already refer to the primary branch/office.- Sample
- Sample
use_dataset=True
- swift11(primary: bool = False, use_dataset: bool = False) str ¶
Generate an 11-digit SWIFT code.
This method uses |swift| under the hood with the
length
argument set to11
. Ifprimary
is set toTrue
, the SWIFT code will always end with'XXX'
. All 11-digit SWIFT codes use this convention to refer to the primary branch/office.- Sample
- Sample
use_dataset=True
- swift(length: Optional[int] = None, primary: bool = False, use_dataset: bool = False) str ¶
Generate a SWIFT code.
SWIFT codes, reading from left to right, are composed of a 4 alphabet character bank code, a 2 alphabet character country code, a 2 alphanumeric location code, and an optional 3 alphanumeric branch code. This means SWIFT codes can only have 8 or 11 characters, so the value of
length
can only beNone
or the integers8
or11
. If the value isNone
, then a value of8
or11
will randomly be assigned.Because all 8-digit SWIFT codes already refer to the primary branch or office, the
primary
argument only has an effect if the value oflength
is11
. Ifprimary
isTrue
andlength
is11
, the 11-digit SWIFT codes generated will always end in'XXX'
to denote that they belong to primary branches/offices.For extra authenticity, localized providers may opt to include SWIFT bank codes, location codes, and branch codes used in their respective locales. If
use_dataset
isTrue
, this method will generate SWIFT codes based on those locale-specific codes if included. If those codes were not included, then it will behave as ifuse_dataset
wereFalse
, and in that mode, all those codes will just be randomly generated as per the specification.- Sample
- Sample
length=8
- Sample
length=8, use_dataset=True
- Sample
length=11
- Sample
length=11, primary=True
- Sample
length=11, use_dataset=True
- Sample
length=11, primary=True, use_dataset=True
- class faker.providers.bank.ru_RU.Provider(generator: Any)¶
Bases:
faker.providers.bank.Provider
Implement bank provider for
ru_RU
locale.Sources for region codes, currency codes, and bank names:
https://ru.wikipedia.org/wiki/Коды_субъектов_Российской_Федерации
https://ru.wikipedia.org/wiki/Общероссийский_классификатор_валют
- country_code = 'RU'¶
- region_codes = ('01', '03', '04', '05', '07', '08', '10', '11', '12', '14', '15', '17', '18', '19', '20', '22',...¶
- department_code_formats = ('0#', '1#', '2#', '3#', '4#', '5#', '6#', '7#', '8#', '9#')¶
- credit_organization_code_formats = ('05#', '06#', '07#', '08#', '09#', '1##', '2##', '3##', '4##', '5##', '6##', '7##', '8##', '9##')¶
- checking_account_codes¶
- organization_codes = ('01', '02', '03', '04')¶
- currency_codes = ('008', '012', '032', '036', '044', '048', '050', '051', '052', '060', '064', '068', '072',...¶
- banks = ('Абсолют Банк', 'Авангард', 'Аверс', 'Автоградбанк', 'Автокредитбанк', 'Автоторгбанк', 'Агора',...¶
- bic() str ¶
Generate a bank identification code (BIC).
BIC is a bank identification code that is used in Russia. See https://ru.wikipedia.org/wiki/Банковский_идентификационный_код.
- correspondent_account() str ¶
Generate a correspondent account number.
Correspondent account is established to handle various financial operations between financial institutions. See https://ru.wikipedia.org/wiki/Корреспондентский_счёт.
- checking_account() str ¶
Generate a checking account number.
Checking account is used in banks to handle financial operations of clients. See https://ru.wikipedia.org/wiki/Расчётный_счёт.