contexte: load an LLM dataset, prompt or context in one line of Python
Tony, creator of Contexte Tech · 29. September 2026
Until now, using a Contexte Tech resource in a program always meant the same steps: open the page, download the file, put it in the project, write a few lines to read it. And start again every time the resource was updated.
Not anymore: the contexte package is out on PyPI.
pip install contexte
One resource, one line
Each resource is loaded by its name, as shown at the top of its page (author/name):
import contexte
ds = contexte.load("contextetech/anonymisation-rgpd-fr")
print(len(ds), ds[0])
What you get depends on the kind of resource:
- a dataset comes as ready-to-use rows (20 examples here) that you iterate like a list;
- a prompt fills itself and tells you which variables are missing:
p = contexte.load("contextetech/fiche-produit-ecommerce")
print(p.variables) # ['produit', 'caracteristiques', 'public']
text = p.fill(produit="Headphones", caracteristiques="Bluetooth, 30 h battery", public="students")
- a few-shot context gives you the system prompt and messages ready for the chat API of your choice (Claude, Mistral…):
c = contexte.load("contextetech/anonymisation-rgpd")
system = c.system_prompt()
messages = c.messages("Hello, I'm Jean Martin, reachable at 06 11 22 33 44.")
Short codes and the command line
Every resource has a short code: the end of its URL. For …/fiche-produit-ecommerce-jr6t0n, it’s jr6t0n. That’s enough to load it:
p = contexte.load("jr6t0n")
And if you’d rather not write Python, the package also installs a command:
contexte get jr6t0n # → fiche-produit-ecommerce.json
contexte get contextetech/anonymisation-rgpd-fr -o data/
contexte search rgpd --kind dataset
Each download reminds you of the resource’s license, so you know right away what you’re allowed to do with it.
How much will it cost?
Before plugging a context into a model, it’s worth knowing the price:
contexte.cost("contextetech/anonymisation-rgpd")
You get the estimated cost in euros, per call and per 1,000 calls, on the main API models. For an open model resource, it’s the rental price of a suitable GPU, with the best current offer. The same figures appear in the Cost tab of each resource.
Light and open
- No dependencies: only the Python standard library, installs in a second;
- Read-only, no account: the package calls Contexte Tech’s public API;
- MIT license: free to use, including in a commercial product.
Every resource in the catalogue now shows, in its Usage tab, the pip install contexte command and the two or three lines to use it. Just copy.