summaryrefslogtreecommitdiff
path: root/venv/lib/python3.11/site-packages/faker/providers/barcode/en_CA
diff options
context:
space:
mode:
Diffstat (limited to 'venv/lib/python3.11/site-packages/faker/providers/barcode/en_CA')
-rw-r--r--venv/lib/python3.11/site-packages/faker/providers/barcode/en_CA/__init__.py24
-rw-r--r--venv/lib/python3.11/site-packages/faker/providers/barcode/en_CA/__pycache__/__init__.cpython-311.pycbin0 -> 1126 bytes
2 files changed, 24 insertions, 0 deletions
diff --git a/venv/lib/python3.11/site-packages/faker/providers/barcode/en_CA/__init__.py b/venv/lib/python3.11/site-packages/faker/providers/barcode/en_CA/__init__.py
new file mode 100644
index 0000000..aae2a58
--- /dev/null
+++ b/venv/lib/python3.11/site-packages/faker/providers/barcode/en_CA/__init__.py
@@ -0,0 +1,24 @@
+from itertools import product
+
+from ..en_US import Provider as EnUsBarcodeProvider
+
+
+class Provider(EnUsBarcodeProvider):
+ """Implement barcode provider for ``en_CA`` locale.
+
+ Canada uses UPC as well, so there are similarities between this and the
+ ``en_US`` implementation.
+
+ Sources:
+
+ - https://gs1.org/standards/id-keys/company-prefix
+ - https://www.nationwidebarcode.com/upc-country-codes/
+ """
+
+ local_prefixes = (
+ # Some sources do not specify prefixes 00~01, 06~09 for use in Canada,
+ # but it's referenced in other pages
+ *product((0,), range(2)),
+ *product((0,), range(6, 10)),
+ (7, 5),
+ )
diff --git a/venv/lib/python3.11/site-packages/faker/providers/barcode/en_CA/__pycache__/__init__.cpython-311.pyc b/venv/lib/python3.11/site-packages/faker/providers/barcode/en_CA/__pycache__/__init__.cpython-311.pyc
new file mode 100644
index 0000000..eab691c
--- /dev/null
+++ b/venv/lib/python3.11/site-packages/faker/providers/barcode/en_CA/__pycache__/__init__.cpython-311.pyc
Binary files differ