EANGenerator generator¶
Generate EAN-13 product codes, optionally unique within one process.
Why: Use EANGenerator for product fixtures that need EAN-13-shaped identifiers; enable unique only for bounded single-process pools and use a key strategy when global uniqueness is required.
Category: ecommerce.
Output: str.
1 | |
Parameters¶
locale:str | null; Defaulten_US— Faker locale used by the barcode provider.unique:bool; DefaultFalse— Whether the in-process Faker provider must avoid repeated EAN values.