About this training#
Goals of this training#
We would like this training to be
up-to-date in 2025,
adapted for French speakers,
adapted for Windows, macOS and Linux users,
adapted for face-to-face courses.
This training is not meant for real beginners in programming and Python.
This training is thought to improve the level of the participants for them to become good Python programmers for most things useful in science. Moreover, we want also that the participants get the keys to understand the technical issues around Python and its ecosystems.
This means to get a good understanding and knowledge of the language, its nature, its ecosystem, for what it can be used and its limitations. This also means to understand how Python compares with other languages. We shall give a broad presentation of the tools and methods to work with Python in 2025. Of course, we shall also present how to find information and how to use modern tools to code in Python.
Python is a generalist, open-source, dynamically strongly typed, multi-paradigm and
multi-platform language. It is primarily used interpreted but can also be compiled, via
just-in-time or ahead-of-time compilations. Python is a language with one reference
implementation (the interpreter CPython) and different full and partial alternative
implementations which take the form of interpreters (for example PyPy, GraalPy,
MicroPython) and compilers/transpilers (for example Pythran). Python is extensible in C
and with other native languages (for example Rust). It can be used directly with a
python
executable or embedded in applications.
After this training, one should get a good understanding of these sentences!
Great success over the last 10 years, driven in particular by its success in the field of IO, machine learning, deep learning and LLM. However, Python is also used for several other things, of course data analysis and visualisation, but also High Performance Computing, web, command line and graphical user interfaces, API of applications, IT automation, control of laboratory experiments (in particular with microcontrollers)… Python is a very generalist language, sometime described at not the best language to do one thing but not far from the second for most applications.
However, since Python is characterized by a nice gradual learning curve and a good readability, it excels in education as a first programming language. Python is also particularly suitable for fast prototyping and to exchange ideas between humans with codes. Python is very adapted in situations for which code has to be read and written partly by not professional developers.
Python and its ecosystems has considerably evolved during the last few years, in particular for the following subjects:
Installation of Python and of Python packages.
Packaging and project managers (PDM, UV, Flit, Hatchling).
Gradual typing and type checkers.
Asynchronous code and concurrency.
Performance and CPython JIT.
Parallelism, the GIL and free-threading.
Python has been used a lot for web application on the server side (part knows as the “backend”). For example, Netflix, Instagram, and YouTube websites are known to use Python on their servers. However, Python can now also be used on the client side (frontend, i.e. in web browsers) with tools like Pyodide, JupyterLite, PyScript or FastHTML.
Without going into the details of all subjects, we are going to explain what’s new and present the modern tools and methods.
Many different ways to use Python (in the terminal, in IPython and Jupyter, in browsers, in the cloud) and to install it…
Content (draft)#
We will start coding very simple things without installing anything by using Python in the browser with a minimal website based on JupyterLite.
Some notes on installing Python in different situations; virtual environments; pip and conda.
We will discover the different ways to use Python: with the
python
executable, with IPython, in IDEs like VSCode and Spyder, in JupyterLab, in the browser and in the cloud.The first chapter of this course will present many concept used in this introduction and show how Python is placed in a larger environment.
The second part of this course will be dedicated to give a good knowledge of the language, i.e. “pure Python” without external packages. We shall see just enough to be able to understand the documentation and API of most Python libraries, i.e. we will study quite simple OOP, context managers and decorators, but not very advanced Python aspects, like metaclasses, dynamical type creation, descriptors, coroutines, weakref, inspect, … However, we want you to really master the Python language to not fall into common traps, so we will study objects, variables, references and name spaces.
Bases of scientific Python programming with Numpy, Matplotlib and Pandas. A list of useful libraries like Scipy, scikit-learn, scikit-image, …
Modern Python packaging (PyPA, PEP 517, …), project managers (PDM, UV, Flit, Hatchling),formatting, testing with few words on CI.
Performance: optimization and premature optimization; complexity and algorithms; benchmarking, profiling, compilation
Parallelism (GIL, notion of concurrency, threading, multiprocessing, OpenMP with Pythran, …)
Introduction on GPU computing with Python (Numba, PyOpenCL, PyCuda, Taichi, CuPy, JAX, pyvkfft, …)
List of nice tools and subjects
Textual
FastHTML
Voilà
…
Few advanced chapters not studied during the training (typing, async/await, free-threading, subinterpreters, …)?
Notes on new tools and languages inspired by Python (Codon, Mojo)?
About practical work#
Short and long exercices.