Faker Food Shop Provider
A custom Faker provider for generating realistic fake data for food shops, restaurants, bakeries, and more.
This provider supports multiple locales (en_US, fr_FR, it_IT, es_ES) to generate localized shop names, products, and drinks.
🌍 Supported Locales
| Locale | Language | Shop Types | Example Shop Name | Example Product |
|---|---|---|---|---|
en_US |
English (US) | pizza place, bakery, kebab shop, wine shop, sushi bar, etc. | "Pizza Hut" | "pepperoni pizza" |
fr_FR |
French (France) | pizzeria, boulangerie, kebab, caviste, sushis, etc. | "Boulangerie Martin" | "baguette tradition" |
it_IT |
Italian (Italy) | pizzeria, panificio, gelateria, enoteca, sushi bar, etc. | "Pizzeria da Michele" | "margherita" |
es_ES |
Spanish (Spain) | pizzería, panadería, kebab, tienda de vinos, bar de sushi, etc. | "Panadería La Ideal" | "barra de pan" |
Default locale:
en_US(if no locale is specified).
📦 Installation
pip install faker-food-shop
Or install from the repository:
cd /path/to/project
git clone https://github.com/arribo44/faker-food-shop.git
cd faker-food-shop
pip install -e .
🚀 Usage
Basic Setup
from faker import Faker
from faker_food_shop import FoodShopProvider
# Use default locale (en_US)
fake = Faker()
fake.add_provider(FoodShopProvider)
# Or specify a locale
fake_fr = Faker('fr_FR')
fake_fr.add_provider(FoodShopProvider)
fake_it = Faker('it_IT')
fake_it.add_provider(FoodShopProvider)
fake_es = Faker('es_ES')
fake_es.add_provider(FoodShopProvider)
🏪 Shop Types & Names
# Random shop type (depends on locale)
shop_type = fake.shop_type() # "pizza place" (en_US), "pizzeria" (fr_FR), etc.
# Random shop name
shop_name = fake.shop_name() # "Pizza Hut" (en_US), "Boulangerie Martin" (fr_FR), etc.
# Shop name for a specific type
pizzeria_name = fake.shop_name("pizza place") # en_US
boulangerie_name = fake_fr.shop_name("boulangerie") # fr_FR
🍹 Drinks
# Random drink (any category)
drink = fake.drink() # "coffee" (en_US), "vin rouge" (fr_FR), "caffè" (it_IT)
# Drink by category
alcoholic = fake.drink("alcoholic") # "beer", "whiskey", "bière blonde"
non_alcoholic = fake.drink("non_alcoholic") # "water", "jus d'orange", "aranciata"
hot = fake.drink("hot") # "coffee", "thé", "caffè latte"
# Random drink category
drink_category = fake.drink_category() # "alcoholic", "non_alcoholic", "hot"
🍕 Products by Shop Type
# Random product for a shop type
product = fake.product("pizza place") # "pepperoni pizza" (en_US)
product_fr = fake_fr.product("pizzeria") # "margherita" (fr_FR)
# Product with specific category
pizza = fake.product("pizza place", "pizzas") # "margherita"
bread = fake.product("bakery", "breads") # "sourdough"
# Random product category for a shop type
category = fake.product_category("bakery") # "breads", "pastries", "viennoiseries"
🍰 Specific Product Helpers
Pizzas
# Pizza name
pizza = fake.pizza() # "pepperoni" (en_US), "margherita" (fr_FR), "diavola" (it_IT)
# Pizza size
size = fake.pizza_size() # "large" (en_US), "grande" (fr_FR), "media" (it_IT)
# Dough type
dough = fake.pizza_dough() # "thin" (en_US), "fine" (fr_FR), "sottile" (it_IT)
Bakery
bread = fake.bread() # "sourdough" (en_US), "baguette tradition" (fr_FR)
pastry = fake.pastry() # "croissant" (en_US/fr_FR), "sfogliatella" (it_IT)
Kebab
meat = fake.kebab_meat() # "beef" (en_US), "viande d'agneau" (fr_FR)
sauce = fake.kebab_sauce() # "garlic sauce" (en_US), "blanche" (fr_FR)
Crepes
sweet = fake.sweet_crepe() # "Nutella" (en_US/fr_FR), "nutella" (it_IT)
savory = fake.savory_crepe() # "ham and cheese" (en_US), "complète" (fr_FR)
Other Products
sandwich = fake.sandwich() # "BLT" (en_US), "jambon beurre" (fr_FR)
burger = fake.burger() # "cheeseburger" (en_US), "hamburger" (fr_FR)
ice_cream = fake.ice_cream() # "vanilla" (en_US), "vanille" (fr_FR)
sorbet = fake.sorbet() # "lemon" (en_US), "citron" (fr_FR)
cheese = fake.cheese() # "cheddar" (en_US), "camembert" (fr_FR)
cold_meat = fake.cold_meat() # "ham" (en_US), "jambon cru" (fr_FR)
fish = fake.fish() # "salmon" (en_US), "saumon" (fr_FR)
meat = fake.meat() # "beef" (en_US), "boeuf" (fr_FR)
meat_cut = fake.meat_cut() # "steak" (en_US), "entrecôte" (fr_FR)
Wine & Sushi
# Wine shop products
wine = fake.wine() # "vin rouge" (fr_FR), "vino rosso" (it_IT), "red wine" (en_US)
wine_region = fake.wine_region() # "Bordeaux" (fr_FR), "Piemonte" (it_IT), "Napa Valley" (en_US)
wine_vintage = fake.wine_vintage() # "2018" (any locale)
# Sushi bar products
sushi = fake.sushi() # "sashimi de saumon" (fr_FR), "sashimi di salmone" (it_IT)
sushi_accompaniment = fake.sushi_accompaniment() # "sauce soja" (fr_FR), "salsa di soia" (it_IT)
💰 Quantities & Prices
# Random quantity
quantity = fake.quantity() # 1, 2, 3, ..., 100
# Random price (default: 1.0 to 50.0)
price = fake.price() # 12.99
# Price by category
pizza_price = fake.price(category="pizza") # 8.0 to 25.0 (en_US), 6.0 to 20.0 (it_IT)
bread_price = fake.price(category="bread") # 2.0 to 8.0 (en_US)
drink_price = fake.price(category="drink") # 2.0 to 15.0 (en_US)
# Custom price range
custom_price = fake.price(min_price=10.0, max_price=20.0) # 15.45
🛒 Orders
# Single order item
item = fake.order_item("pizza place")
# {'product': 'pepperoni', 'category': 'pizzas', 'quantity': 2, 'unit_price': 12.5, 'total': 25.0}
# Full order with multiple items
order = fake.order("bakery", min_items=3, max_items=5)
# {
# 'shop_type': 'bakery',
# 'shop_name': 'Wonder Bread',
# 'items': [
# {'product': 'sourdough', 'category': 'breads', 'quantity': 2, 'unit_price': 3.5, 'total': 7.0},
# {'product': 'croissant', 'category': 'pastries', 'quantity': 3, 'unit_price': 2.0, 'total': 6.0},
# ...
# ],
# 'subtotal': 20.5,
# 'tax_rate': 8.25,
# 'tax_amount': 1.69,
# 'total': 22.19
# }
🌎 Locale-Specific Examples
English (en_US)
from faker import Faker
from faker_food_shop import FoodShopProvider
fake = Faker('en_US')
fake.add_provider(FoodShopProvider)
print(fake.shop_name()) # "Pizza Hut"
print(fake.drink()) # "coffee"
print(fake.pizza()) # "pepperoni"
French (fr_FR)
fake_fr = Faker('fr_FR')
fake_fr.add_provider(FoodShopProvider)
print(fake_fr.shop_name()) # "Boulangerie Martin"
print(fake_fr.drink()) # "café"
print(fake_fr.pizza()) # "margherita"
Italian (it_IT)
fake_it = Faker('it_IT')
fake_it.add_provider(FoodShopProvider)
print(fake_it.shop_name()) # "Pizzeria da Michele"
print(fake_it.drink()) # "caffè"
print(fake_it.pizza()) # "margherita"
Spanish (es_ES)
fake_es = Faker('es_ES')
fake_es.add_provider(FoodShopProvider)
print(fake_es.shop_name()) # "Panadería La Ideal"
print(fake_es.drink()) # "café con leche"
print(fake_es.pizza()) # "margarita"
🎯 Demo
Run a full demo to see all features:
python -c "
from faker import Faker
from faker_food_shop import FoodShopProvider
for locale in ['en_US', 'fr_FR', 'it_IT', 'es_ES']:
fake = Faker(locale)
fake.add_provider(FoodShopProvider)
print(f'\n=== {locale} ===')
print(f'Shop: {fake.shop_name()}')
print(f'Drink: {fake.drink()}')
print(f'Pizza: {fake.pizza()}')
print(f'Bread: {fake.bread()}')
print(f'Wine: {fake.wine()}')
print(f'Sushi: {fake.sushi()}')
"
🤝 Contributing
Contributions are welcome! Open a PR or issue to suggest improvements, add new locales, or fix bugs.
📜 License
MIT License. See LICENSE for details.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file faker_food_shop-0.8.0.tar.gz.
File metadata
- Download URL: faker_food_shop-0.8.0.tar.gz
- Upload date:
- Size: 53.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbb15028bed0860c22391f7c975ac278a2b1bbbae8a30ceef62754d539eef105
|
|
| MD5 |
cc055d2ee7f43b5369eb10c6f6b9fd6b
|
|
| BLAKE2b-256 |
e4c0c434d78c9d723974ee7fbb0312394fd5dc2610332f48316b97dba3224ed1
|
File details
Details for the file faker_food_shop-0.8.0-py3-none-any.whl.
File metadata
- Download URL: faker_food_shop-0.8.0-py3-none-any.whl
- Upload date:
- Size: 50.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55982dc69f7bd4dbea5cfb87f9560551fff58dd641a4ae6e73818ae013d91890
|
|
| MD5 |
40c9e4d6c0db1205fa02a73a303ac07c
|
|
| BLAKE2b-256 |
6d088d61273b5a380027dfc0c4b7a587120b1da8c48d61034356f9a95b7e1d55
|