faker.providers.barcode.ja_JP
¶
Package Contents¶
Classes¶
Implement default barcode provider for Faker. |
|
Implement barcode provider for |
- class faker.providers.barcode.ja_JP.BarcodeProvider(generator: Any)¶
Bases:
faker.providers.BaseProvider
Implement default barcode provider for Faker.
Sources:
- local_prefixes: PrefixType = ()¶
- ean(length: int = 13, prefixes: PrefixType = ()) str ¶
Generate an EAN barcode of the specified
length
.The value of
length
can only be8
or13
(default) which will create an EAN-8 or an EAN-13 barcode respectively.If a value for
prefixes
is specified, the result will begin with one of the sequences inprefixes
.- Sample
length=13
- Sample
length=8
- Sample
prefixes=(‘00’,)
- Sample
prefixes=(‘45’, ‘49’)
- ean8(prefixes: Tuple[] = ()) str ¶
Generate an EAN-8 barcode.
This method uses |ean| under the hood with the
length
argument explicitly set to8
.If a value for
prefixes
is specified, the result will begin with one of the sequences inprefixes
.- Sample
- Sample
prefixes=(‘00’,)
- Sample
prefixes=(‘45’, ‘49’)
- ean13(prefixes: PrefixType = ()) str ¶
Generate an EAN-13 barcode.
This method uses |ean| under the hood with the
length
argument explicitly set to13
.If a value for
prefixes
is specified, the result will begin with one of the sequences inprefixes
.Note
Codes starting with a leading zero are treated specially in some barcode readers. For more information on compatibility with UPC-A codes, see |EnUsBarcodeProvider.ean13|.
- Sample
- Sample
prefixes=(‘00’,)
- Sample
prefixes=(‘45’, ‘49’)
- localized_ean(length: int = 13) str ¶
Generate a localized EAN barcode of the specified
length
.The value of
length
can only be8
or13
(default) which will create an EAN-8 or an EAN-13 barcode respectively.This method uses the standard barcode provider’s |ean| under the hood with the
prefixes
argument explicitly set tolocal_prefixes
of a localized barcode provider implementation.- Sample
- Sample
length=13
- Sample
length=8
- localized_ean8() str ¶
Generate a localized EAN-8 barcode.
This method uses |localized_ean| under the hood with the
length
argument explicitly set to8
.
- localized_ean13() str ¶
Generate a localized EAN-13 barcode.
This method uses |localized_ean| under the hood with the
length
argument explicitly set to13
.
- class faker.providers.barcode.ja_JP.Provider(generator: Any)¶
Bases:
faker.providers.barcode.Provider
Implement barcode provider for
ja_JP
locale.Japanese local EAN barcodes are called JAN-codes.
Sources:
- local_prefixes = ((4, 5), (4, 9))¶
- jan(length: int = 13) str ¶
Generate a JAN barcode of the specified
length
.This method is an alias for
JaJpProvider.localized_ean()
.- Sample
- Sample
length=8
- Sample
length=13