ue_pe_web/scripts/01_intro_python
2024-02-15 11:10:45 +01:00
..
src/intro_python Fix useless commands in intro_python_complete. 2024-02-15 11:10:45 +01:00
tests rename modules to follow pdf. 2024-01-24 10:45:00 +01:00
.gitignore rename modules to follow pdf. 2024-01-24 10:45:00 +01:00
exec.sh rename modules to follow pdf. 2024-01-24 10:45:00 +01:00
pdm.lock rename modules to follow pdf. 2024-01-24 10:45:00 +01:00
pyproject.toml rename modules to follow pdf. 2024-01-24 10:45:00 +01:00
README.md rename modules to follow pdf. 2024-01-24 10:45:00 +01:00
STUDENT_COMPLETE_VERSIONS.md rename modules to follow pdf. 2024-01-24 10:45:00 +01:00

UE PE serveur web : TP1 Intro Python

Setting up

Let's first initialise a Python environment that is local to this project. The following commands will create a env/ directory containing a local Python installation. The second line will then activate it; our terminal will use the local installation:

Commençons par initialiser un environnement Python local au projet. Les commandes suivantes vont crée un répertoire venv/ qui contiendra une installation Python locale. La deuxième ligne va ensuite l'activer ; notre terminal utilisera alors l'installation locale :

python3 -m venv venv
source venv/bin/activate

We are going to use PDM to package our project. Let's install it with pip:

On va utiliser PDM pour empaqueter notre projet. Installons-le avec pip :

pip install pdm

We can now run the pdm command. We need to install all known dependencies in our development environment:

Nous avons maintenant accès à la commande pdm. Utilisons-la pour installer toutes les dépendances nécessaires dans notre environnement de développement :

pdm install

Building

Now let's build our project just to check that everything is alright:

On peut désormais lancer la commande pdm. Essayons de build notre programme pour être sûr⋅e que tout va bien :

pdm build