Skip to main content

Faker Food Shop Provider

PyPI version Python 3.7+ License: MIT

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()}')
    # For a complete demo with all features and 10 examples per category for every locale, see examples/basic_usage.py
"
---

## 🤝 Contributing

Contributions are welcome! Open a PR or issue to suggest improvements, add new locales, or fix bugs.

---

## 📜 License

MIT License. See [LICENSE](LICENSE) for details.

Metadata

Release files for faker-food-shop 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for faker-food-shop 0.9.0
File Size Uploaded Provenance Actions
faker_food_shop-0.9.0.tar.gz 54.1 kB Without provenance Details for faker_food_shop-0.9.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for faker-food-shop 0.9.0
File Interpreter ABI Platform Actions
faker_food_shop-0.9.0-py3-none-any.whl Python 3 none any Details for faker_food_shop-0.9.0-py3-none-any.whl

Total release size: 105.7 kB

Release files / faker_food_shop-0.9.0.tar.gz

Download URL faker_food_shop-0.9.0.tar.gz
Size 54.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1b157e8100cf47ea30a151a1f11a294c879be6a3b2a7ea1d8b27516acdcdb3e2
BLAKE2b-256 checksum
How to use checksums
120b7c750c8171ca81f3a9278d75e552f2aa2808db9a9fc158f61c3764b2770c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / faker_food_shop-0.9.0-py3-none-any.whl

Download URL faker_food_shop-0.9.0-py3-none-any.whl
Size 51.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f8129a00e505a567a4d240fd5841a406dd555781f4e709eea929b22a69ffdf3
BLAKE2b-256 checksum
How to use checksums
835e0fbe240cf79dfab65cb45964cf715f9607ab3df5c58f25fa9eda562e9812
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for faker-food-shop 0.9.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page