faker.providers.barcode.es_ES

Package Contents

Classes

BarcodeProvider

Implement default barcode provider for Faker.

Provider

Implement barcode provider for es_ES locale.

class faker.providers.barcode.es_ES.BarcodeProvider(generator: Any)

Bases: faker.providers.BaseProvider

Implement default barcode provider for Faker.

Sources:

local_prefixes: PrefixType = ()
_ean(length: int = 13, prefixes: PrefixType = ()) str
ean(length: int = 13, prefixes: PrefixType = ()) str

Generate an EAN barcode of the specified length.

The value of length can only be 8 or 13 (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 in prefixes.

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 to 8.

If a value for prefixes is specified, the result will begin with one of the sequences in prefixes.

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 to 13.

If a value for prefixes is specified, the result will begin with one of the sequences in prefixes.

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 be 8 or 13 (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 to local_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 to 8.

localized_ean13() str

Generate a localized EAN-13 barcode.

This method uses |localized_ean| under the hood with the length argument explicitly set to 13.

class faker.providers.barcode.es_ES.Provider(generator: Any)

Bases: faker.providers.barcode.Provider

Implement barcode provider for es_ES locale.

Sources:

local_prefixes = ((8, 4),)