Why Python? It is the common language of the AI ecosystem: almost all model, embedding, RAG and orchestration libraries are used in Python. Mastering it — even at a tooling level (isolated environments, dependencies, scripts) — allows automating the operation of the platform, gluing pieces together (Ollama, pgvector, APIs) and prototyping quickly before industrializing. It is the "glue" between the infrastructure and the AI services.
🧠 Python, the reference language for ML & deep learning.

The major AI frameworks — PyTorch, TensorFlow, scikit-learn, Hugging Face — are driven from Python. It is the natural entry point into machine learningMachine learning is a field of study within artificial intelligence based on mathematical and statistical approaches that give computers the ability to "learn" from data […]Wikipedia — "Machine learning" · CC BY-SA and deep learningDeep learning is a subfield of artificial intelligence that uses artificial neural networks composed of many layers to solve complex tasks.Wikipedia — "Deep learning" · CC BY-SA: from data preparation to training and then model inference.

💡 Hover over the underlined terms for a preview (source: Wikipedia).
🛠️ Python stack
ToolUsage
Python 3.11+Main language
venvIsolated virtual environments
pipPackage manager
requirements.txtEnvironment reproducibility
📦 AI libraries
LibraryUsageStatus
psycopg + pgvectorPostgreSQL client · vectors🔵 Planned
langchainScripts / agents (optional)🔵 Planned
ollamaLocal Ollama API client🔵 Planned
openaiOllama-compatible client🔵 Planned
whisperSpeech-to-Text🔵 Planned
requestsHTTP API calls✅ In use
💻 Standard workflow
bash
# Créer un projet IA
mkdir projet-rag && cd projet-rag

# Environnement virtuel
python3 -m venv .venv
source .venv/bin/activate  # Linux/Mac
# .venv\\Scripts\\activate  # Windows

# Installer les dépendances
pip install "psycopg[binary]" pgvector ollama

# Sauvegarder
pip freeze > requirements.txt

# Reproduire l'environnement ailleurs
pip install -r requirements.txt
🐍 Example: Ollama client
python
import ollama

# Chat simple
response = ollama.chat(
    model='mistral',
    messages=[{'role': 'user', 'content': 'Explique VFIO en 3 lignes'}]
)
print(response['message']['content'])

# Streaming
for chunk in ollama.chat(
    model='mistral',
    messages=[{'role': 'user', 'content': 'Bonjour'}],
    stream=True
):
    print(chunk['message']['content'], end='', flush=True)

Related pages

References & Sources

CategoryResourceURL
Official documentationPython — Documentationdocs.python.org/3
Official documentationpip — User Guidepip.pypa.io
Official documentationvenv — Environnements virtuels (bibliothèque standard)docs.python.org/3/library/venv
Tools usedPython 3.11+ · venv · pip · requirements.txt · psycopg / pgvector (planifié)—
LicensePython — PSF Licensedocs.python.org/3/license
Content of this pageShared under CC BY-SA 4.0creativecommons.org/licenses/by-sa/4.0