Skip to content

v0.3.0 - Other Rohlík Group shops

Latest

Choose a tag to compare

@dvejsada dvejsada released this 27 Sep 06:01
d4779ff

Every Rohlík Group shop can now be targeted using presets published by the library, and the cart model reports its currency and the shop's minimum order value.

Added

  • SITES / Site: presets for all Rohlík Group shops, keyed by country code: cz Rohlík.cz, de Knuspr.de, at Gurkerl.at, hu Kifli.hu, ro Sezamo.ro. Each has code, name, base_url, currency and timezone. Usage: RohlikAPI(user, pw, base_url=SITES["de"].base_url) (#10)
  • CartItem.currency: ISO 4217 code of the item price, e.g. "EUR" (#10)
  • Cart.currency: taken from the cart's items, because the cart response has no currency of its own. It is None when the cart is empty or no item reports one (#10)
  • Cart.minimum_order_price: the shop's minimum order value, from minimalOrderPrice, which was previously dropped. It is None if the API omits it; anonymous carts report 0 (#9)

Changed

  • The Cart.can_make_order docstring no longer claims it tracks the minimum order. submitConditionPassed also requires checkout details such as a delivery slot, so compare total_price with minimum_order_price instead.
  • Documentation (#12):
    • The README now covers the other shops (new "Other shops" section) and documents products.get_cards, products.get_week_sales, delivery.get_addresses and delivery.get_active_address_id.
    • The README's error-handling section is complete.
    • example.py shows how to pick a shop.
    • PUBLISHING.md describes the real release flow.

Compatibility

  • No breaking changes. The new dataclass fields have defaults and come after the existing ones, and the new exports only add names.
  • Requires Python 3.13+.

Install: pip install --upgrade rohlik-api