api.services.ultimate3000.pricing ================================= .. py:module:: api.services.ultimate3000.pricing .. autoapi-nested-parse:: Grille de reprise U3000 Thermo — source: the Google Sheet 'Offre de reprise U3000 Rewake'. The live grid is scraped from the sheet by the `u3000_price_grid` script (api/scripts/) and read here from its run snapshot in Redis; the grids below (sheet of 29/10/2026) are only the fallback while Redis has none (first deploy, tests, Redis down). Prix €HT: (prix module fonctionnel, prix sinon). "Non testé" => prix "sinon". Attributes ---------- .. autoapisummary:: api.services.ultimate3000.pricing.logger api.services.ultimate3000.pricing.CATEGORIES api.services.ultimate3000.pricing.CUTOFF_YEAR api.services.ultimate3000.pricing.COMPLETE_CHAIN_BONUS api.services.ultimate3000.pricing.LOGISTICS api.services.ultimate3000.pricing.MAX_MODULES api.services.ultimate3000.pricing.STACKS_PER_PALLET api.services.ultimate3000.pricing.Grid api.services.ultimate3000.pricing.SHEET_SCRIPT api.services.ultimate3000.pricing.CACHE_SECONDS Functions --------- .. autoapisummary:: api.services.ultimate3000.pricing.grids api.services.ultimate3000.pricing.catalog api.services.ultimate3000.pricing.max_prices api.services.ultimate3000.pricing.module_price api.services.ultimate3000.pricing.stacks api.services.ultimate3000.pricing.bonus_modules api.services.ultimate3000.pricing.pallets api.services.ultimate3000.pricing.estimate Module Contents --------------- .. py:data:: logger .. py:data:: CATEGORIES :value: ['Dégazeur', 'Pompe', 'Autosampler', 'Compartiment colonne', 'Détecteur'] .. py:data:: CUTOFF_YEAR :value: 2013 .. py:data:: COMPLETE_CHAIN_BONUS :value: 0.15 .. py:data:: LOGISTICS .. py:data:: MAX_MODULES :value: 42 .. py:data:: STACKS_PER_PALLET :value: 2 .. py:data:: Grid .. py:data:: SHEET_SCRIPT :value: 'u3000_price_grid' .. py:data:: CACHE_SECONDS :value: 30 .. py:function:: grids() -> dict[str, Grid] {"post_2013": Grid, "pre_2013": Grid}: the last grid scraped from the sheet, else the built-in one. .. py:function:: catalog() -> dict[str, dict[str, list[str]]] Models bought back per price list and category. .. py:function:: max_prices() -> dict[str, float] Best price per category (recent, working module): the "jusqu'à" figures of the landing page. .. py:function:: module_price(categorie: str, modele: str, annee: int, etat: str) -> float | None None = module absent de la grille de son année : Rewake ne le reprend pas. .. py:function:: stacks(categories: list[str]) -> list[list[int]] Groups modules (as indices into `categories`) into stacks, top to bottom. Two modules of the same type are never stacked on each other, so there are as many stacks as copies of the most repeated type: stack k holds the k-th module of each type, in UltiMate order (degasser on top). The first stacks are therefore the most complete; 5 different modules look like the real UltiMate 3000. .. py:function:: bonus_modules(categories: list[str]) -> set[int] Modules that form complete machines (stacks with all 5 types): only they get the bonus, never extra loose ones. .. py:function:: pallets(categories: list[str]) -> list[list[list[int]]] Stacks (see `stacks`) grouped onto Euro pallets. .. py:function:: estimate(modules: list[dict], logistique: str | None, cables_vipers: bool) -> dict `logistique=None` means outside mainland France: logistics, hence the total, are quoted by the sales team.