Python Glossary from A to Z

Python Glossary — 125 definitions

__init__ / self
__init__ is the constructor, called when the object is created; self refers to the current object, passed to every method.
*args / **kwargs
Accept a variable number of arguments: *args (list of values), **kwargs (dictionary of name=value pairs).
Activation
Making a venv active in the terminal (Scripts\activate on Windows) so that pip and python point to it.
REST API
An interface exposing data/actions through URLs and HTTP methods, exchanging JSON.
assert
Checks that a condition is true; otherwise the test fails. assert somme(2,3) == 5.
async / await
async defines a coroutine; await pauses while waiting for a result, freeing the program for other tasks.
asyncio
Standard module orchestrating coroutine execution through an event loop.
Attribute / method
An attribute is object data (self.nom); a method is a function attached to the object.
Automation (scripting)
Writing a program that performs a repetitive task for you (files, e-mails, spreadsheets, reports).
BeautifulSoup
Library parsing HTML and making it easy to extract elements (tags, texts, links).
Library
Ready-to-use code you import so you don't rewrite everything (e.g. pandas for data, Django for the web).
Standard library
Modules shipped with Python: datetime, os, sys, json, random, math, collections, pathlib…
bool
Boolean: True or False. Result of comparisons, basis of conditions.
for loop
Repeats a block for each element of a sequence: for x in sequence.
while loop
Repeats a block AS LONG AS the condition stays true. Risk of an infinite loop if the condition never changes.
break / continue
break exits the loop immediately; continue jumps straight to the next iteration.
Use case
Field of application: web development (back-end), data science, AI/machine learning, automation/scripts, DevOps, science.
CI/CD
Continuous integration (automatically testing every change) / Continuous deployment (going live automatically).
Class / object
The class is the blueprint (mould); the object (instance) is a concrete creation from that blueprint.
Cloud (PaaS)
Online hosting. PaaS platforms (Render, Railway, Fly.io, managed cloud) simplify going to production.
Clean code
Readable, simple code: explicit names, short single-responsibility functions, no duplication.
Comment
Text ignored by Python, starting with #. Explains code to humans.
Consolidation
Reusing several concepts together in the same program until they become reflexes.
Container
A running instance of an image: an isolated, lightweight, reproducible application.
Conversion (casting)
Changing type: int("30") turns the text "30" into the number 30; str(30) does the reverse.
Coroutine
Async function (async def) that can be suspended and resumed, managed by the event loop.
CSV
Text file where values are separated by commas: universal exchange format (spreadsheets). csv module.
DataFrame
Data table with named rows and columns, like a spreadsheet sheet, manipulable in Python.
Debugging
Hunting and fixing errors. print() and reading error messages are your first tools.
Decomposition
Breaking a problem into small simple steps/functions: the programmer's key skill.
Decorator
Function wrapping another to add behaviour (logging, timing, access control), via the @decorateur syntax.
Deep learning
ML subfield based on deep neural networks (TensorFlow, PyTorch), at the heart of modern AI.
Deployment
Making the application available on a server/cloud so users can access it.
Design pattern
Standard reusable solution to a common design problem (Singleton, Factory, Observer…).
Dictionary (dict)
Set of key→value pairs, in braces: {"nom": "Ada"}. Accessed by key, not by position.
Django
Full-featured Python web framework ("batteries included"): admin, ORM, auth, security built in.
Docker
Containerization tool: packages an application and its whole environment so it runs identically everywhere.
docker build / run
build builds the image from the Dockerfile; run starts a container from the image.
Dockerfile
Recipe file describing, step by step, how to build the image (base, dependencies, code, launch command).
Ecosystem
The huge collection of free libraries and tools around Python: its real strength, far beyond the language alone.
Editor / IDE
Software for writing code, with highlighting, autocompletion and debugging. VS Code is a very popular extensible editor; PyCharm is a dedicated IDE.
Set
Unordered collection of UNIQUE values: {1, 2, 3}. Ideal for deduplicating and membership testing.
Training / prediction
You train (fit) the model on known data, then you predict (predict) on new data.
Virtual environment (venv)
Isolated folder containing a Python and packages specific to a project, without interfering with others.
Exception
Error occurring at runtime (ZeroDivisionError, ValueError, FileNotFoundError…) interrupting the program if unhandled.
Boolean expression
Any expression evaluating to True or False, assessed by the condition.
f-string
String prefixed with f where {variable} is replaced by its value: f"Bonjour {nom}". The recommended method since Python 3.6.
FastAPI
Modern, very fast framework based on type hints: automatic data validation and generated interactive docs.
.py file
A text file containing Python code, run as a block with "python monfichier.py".
Running thread
Follow-along project running through the learning journey, giving meaning to each concept by applying it.
finally
Block executed IN ALL CASES (error or not): ideal for releasing a resource (closing a file).
Flask
Minimalist, flexible Python micro-framework: you add what you need. Excellent for learning.
Function / def
Named reusable code block, defined with def nom(paramètres):. Called by nom(arguments).
Formatter (black)
Tool automatically reformatting code to a consistent style, ending formatting debates.
Framework
Structured set of tools imposing an organization, to develop faster and more safely than from scratch.
Generator
Function using yield producing its values one by one, on demand: minimal memory, ideal for large streams.
GitHub Actions
Automation service built into GitHub: describes pipelines in a YAML file (.github/workflows).
Inheritance
A "child" class inherits attributes and methods from a "parent" class, and can extend or override them.
I/O-bound vs CPU-bound
I/O-bound = limited by waiting (network, disk) → asyncio; CPU-bound = limited by computation → multiprocessing.
if __name__ == "__main__"
Block executed only when the file is run directly, not when imported: separates code and testing.
if / elif / else
if tests a condition; elif (else if) tests another if the previous one is false; else covers all other cases.
Image
Frozen reusable template containing the application and its dependencies. Containers are instantiated from it.
import
Loads a module. Variants: import math / from math import sqrt / import numpy as np (alias).
Indentation
Leading offset (4 spaces by convention) defining which block an instruction belongs to. Mandatory in Python.
Index
Position of an element, starting at 0. liste[0] = first element; liste[-1] = last.
int / float
Integers (int: 30) and decimal numbers (float: 3.14). Division / always returns a float.
Python interpreter
The program reading and executing your code. Called with the python command (or python3).
JSON
Structured text format (keys/values) universal for data and APIs. json module: json.load / json.dump.
Lambda
One-line anonymous function: lambda x: x * 2. Useful for short processing passed as an argument.
Interpreted language
Code runs line by line through an interpreter, with no prior compilation step: you test immediately, ideal for learning.
Linter (flake8, pylint)
Tool analyzing code and reporting style deviations and potential errors without running it.
List comprehension
Compact writing: [expression for x in sequence if condition] builds a list in one line.
List
Ordered, modifiable collection, in brackets: [1, 2, 3]. Add with append(), access by index [0].
Machine learning
Approach where a model learns patterns from data to make predictions, without explicit rules.
map / filter
map applies a function to each element of a sequence; filter keeps only those satisfying a condition.
Matplotlib
Visualization library: curves, histograms, scatter plots. Often complemented by seaborn.
Dunder method
Double-underscore method (__str__, __len__, __eq__) customizing object behaviour with Python operations.
HTTP method
GET (read), POST (create), PUT (update), DELETE (delete): the verbs of web exchanges.
String methods
Functions attached to text: .upper(), .lower(), .strip() (removes spaces), .split() (splits), .replace().
Migration
File translating changes to your models into database modifications.
Module
A reusable .py file. Accessed with import mon_module, then mon_module.fonction().
MVT
Model (data), View (logic), Template (HTML display): the code organization of a Django project.
mypy
Tool checking annotation consistency without running code (static analysis).
Data cleaning
Step (often the longest) of fixing missing values, duplicates and inconsistencies before analysis.
NumPy
Numerical computing library: the ndarray array, very fast (written in C), basis of the whole scientific ecosystem.
Comparison operators
==, !=, <, >, <=, >=: compare two values and return a boolean.
Logical operators
and, or, not: combine several conditions.
ORM
Object-Relational Mapping: handling the database through Python objects instead of writing SQL.
Package
A folder containing modules (and an __init__.py), grouping a coherent set of code.
pandas
Tabular data analysis library. Key structure: the DataFrame.
Parameter / argument
The parameter is the variable declared in the definition; the argument is the actual value passed at the call.
PATH
List of folders where the system looks for programs. Checking "Add Python to PATH" at install makes the python command usable everywhere.
PEP 8
Python's official style guide: naming conventions, indentation, spaces, line length (79 characters).
pip
Python package manager: "pip install pandas" downloads and installs a library from PyPI.
Pipeline
Series of automated steps (tests, build, deployment) triggered on every code change.
Scope
Visibility area of a variable. A variable created in a function is local: it does not exist outside.
print()
Function displaying text or values on screen. The basic tool for seeing what a program does.
Async programming
Model where the program doesn't wait passively: it moves to other tasks during idle times (I/O).
Pseudo-code
Describing program steps in plain language before coding: clarifies logic.
PyPI
Python Package Index (pypi.org): the central repository of hundreds of thousands of third-party libraries.
pytest
Most popular test framework: you write test_*() functions containing asserts, run with the pytest command.
Python
Interpreted, high-level programming language known for its readability. Created by Guido van Rossum in 1991, it favors simple, explicit code.
raise
Deliberately raises an exception, to signal an abnormal situation (e.g. a negative age).
range()
Generates a number range: range(5) → 0,1,2,3,4. Widely used with for.
REPL (interactive interpreter)
"Read-Eval-Print Loop": you type an instruction, Python runs it and shows the result at once. Launch it by typing "python" in the terminal.
requests
Library for sending HTTP requests: downloading a web page or querying an API in a few lines.
requirements.txt
List of dependencies and their versions. "pip freeze > requirements.txt" exports it; "pip install -r" reinstalls them.
return
Returns a value from the function and ends its execution. Without return, the function returns None.
Route / endpoint
Association between a URL (/produits) and the responding function, decorated with @app.get(...) / @app.route(...).
scikit-learn
Reference ML library for getting started: classic algorithms through a uniform fit()/predict() API.
Selenium
Tool driving a real browser, for JavaScript-generated sites or ones requiring interactions.
str (string)
Text, in single or double quotes: "Bonjour". Immutable (not modifiable in place).
Syntax
The writing rules of the language. In Python, indentation (leading spaces) is part of the syntax.
Terminal
Window where you type text commands (python, pip…). On Windows: PowerShell; on macOS/Linux: the Terminal.
Automated test
Code automatically checking that a program portion works as expected, re-runnable at any time.
Traceback
The error trace displayed by Python: read bottom-up, it shows the error type and the faulty line.
Train/test split
Splitting data into a training set and a test set, to evaluate the model honestly.
try / except
try holds the risky code; except catches the error and runs fallback code instead of crashing.
Tuple
Ordered but IMMUTABLE (unmodifiable) collection, in parentheses: (lat, lon). Perfect for frozen data.
Type hints
Annotations indicating expected types (a: int) -> str. They document without constraining execution.
Variable
Name referencing a value in memory. Assignment with =: ma_var = valeur.
VS Code
Free editor from Microsoft. With the "Python" extension, it offers execution, autocompletion (IntelliSense) and debugging.
Web scraping
Automated extraction of data from web pages (prices, listings, articles…).
with open()
Opens a file guaranteeing automatic closure: with open("f.txt") as f:.
yield
Returns a value while suspending the function, resumed at the next call: the heart of generators.