Fond KALI
The KaliAPI class (in pylegifrance/fonds/kali.py) is the facade that
exposes the endpoints of the KALI fond: French national collective
bargaining agreements, along with their side agreements and amendments.
KALI organises collective agreements on two levels:
- a container (
KALICONT...), identified by an IDCC number, which groups a collective agreement as a whole; - texts (
KALITEXT...) — base text, amendments, side agreements — which are the actually consultable units, along with their sections (KALISCTA...) and articles (KALIARTI...).
KALI does not expose a /version or /versions endpoint, so there is
no equivalent to .at(date) or .versions() like on the LODA fond.
from pylegifrance import LegifranceClientfrom pylegifrance.fonds.kali import KaliAPIfrom pylegifrance.models.kali.search import SearchRequestfrom pylegifrance.models.kali.enum import TypeChampKali, SortKali
client = LegifranceClient(client_id="...", client_secret="...")kali = KaliAPI(client)
# Agreement by IDCC numberccn = kali.fetch_by_idcc("1261")print(ccn.titre, ccn.texte_base_ids)
# Agreement by KALICONT identifierccn = kali.fetch_container("KALICONT000005635384")
# Text (base, amendment…) by KALITEXT identifiertexte = kali.fetch_text("KALITEXT000005677408")
# Single prefix-based dispatcherobj = kali.fetch("KALIARTI000005833238") # -> TexteKali (kaliArticle endpoint)
# Free-text search (hydrated into ConventionCollective objects)results = kali.search("santé prévoyance")
# Structured searchreq = SearchRequest( search="2098", field=TypeChampKali.IDCC, idcc="2098", sort=SortKali.SIGNATURE_DATE_DESC,)results = kali.search(req)Exposed components
Section titled “Exposed components”KaliAPI.fetch_container(id)→ConventionCollective(POST /consult/kaliCont).KaliAPI.fetch_by_idcc(idcc)→ConventionCollective(POST /consult/kaliContIdcc).KaliAPI.fetch_text(id)→TexteKali(POST /consult/kaliText).KaliAPI.fetch_article(id)→ parentTexteKali(POST /consult/kaliArticle).KaliAPI.fetch_section(id)→ parentTexteKali(POST /consult/kaliSection).KaliAPI.fetch(id)→ prefix-based dispatcher (KALICONT/KALITEXT/KALIARTI/KALISCTA).KaliAPI.search(query)→list[ConventionCollective]viaPOST /searchwithfond: "KALI".
Search model
Section titled “Search model”SearchRequest (in pylegifrance/models/kali/search.py) produces a
SearchRequestDTO in the format expected by the /search endpoint.
Supported fields:
| Field | Usage |
|---|---|
search | Free text |
field | ALL, TITLE, IDCC, MOTS_CLES, ARTICLE |
search_type | EXACTE, TOUS_LES_MOTS_DANS_UN_CHAMP… |
sort | PERTINENCE, SIGNATURE_DATE_DESC/_ASC, MODIFICATION_DATE_DESC |
idcc | IDCC filter (IDCC facet) |
legal_status | Legal status filter (LEGAL_STATUS facet) — see below |
date_signature_start / date_signature_end | Signature date range (DATE_SIGNATURE facet) |
By default, legal_status is pre-filled with
["VIGUEUR", "VIGUEUR_ETEN", "VIGUEUR_NON_ETEN"]: only agreements
currently in force (extended or not) come back. Passing
legal_status=None or legal_status=[] disables this filter and also
returns repealed or expired texts.
Other documented facets (ACTIVITE, NUM_TEXTE_CITE, NOM_CODE_CITE…)
are not wired yet — to be added on demand.
See also
Section titled “See also”- Fond facade — why facades and models are kept separate.
- Official raw:
docs/raw/legifrance/description-des-tris-et-filtres-de-l-api.md(KALI section andconsult-kali*).