Edocti Training
Professional Python Environments — Micro Training (4h)
Scheduled sessions
No sessions are available at the moment.
Skills You Will Learn
Virtual Environments (venv)
Dependency Locking (pip)
Anaconda & Conda
Python Packaging (Wheels)
Pipx & Poetry
OS-Specific Workflows
CI/CD Integration
Publishing to PyPI
Curriculum
Professional baseline & tooling
- Goals: isolation, reproducibility, portability
- Python installations: system Python vs. pyenv vs. Anaconda (when to use what)
- Project scaffold: src layout, `.gitignore`, `.python-version`, `.env`, README badges
- Pinning & locking: `requirements.in`→`requirements.txt` (pip-tools) and `conda env export`
Windows — Anaconda/conda and pip
- Install & update Anaconda/Miniconda; `conda init` for PowerShell
- Create/activate envs: `conda create -n app python=3.11`, `conda activate app`
- Mixing `conda` and `pip` safely; channels; `conda-forge` best practices
- Alternative: pure `pip` + `python -m venv venv`; PowerShell execution policy
- Hands-on: create env, freeze, export, re-create from lock
Linux — venv and virtualenvwrapper (`workon`)
- System packages needed (`python3-venv`, build tools)
- Create/activate with `python -m venv .venv`; `source .venv/bin/activate`
- virtualenvwrapper: install & configure; `mkvirtualenv`, `workon`, `setvirtualenvproject`
- Pip index/auth basics; `pip config` for mirrors/certificates
- Hands-on: set up `workon` workflow and a per-project `.venv`
macOS — Homebrew/conda and venv
- Install via Homebrew: `brew install python` and optional `pyenv`
- Create/activate venv in zsh; fix common PATH and SSL issues
- Conda on macOS: Apple Silicon notes (arm64), `conda-forge`
- Hands-on: one project with venv, one with conda; switching safely
Build & publish a wheel (pyproject.toml)
- Minimal `pyproject.toml` with `build-system` and metadata (PEP 621)
- Editable installs: `pip install -e .` vs. wheel installs
- Build: `python -m build` → `dist/*.whl`
- Local install: `pip install dist/yourpkg-*.whl`
- Upload with `twine` to TestPyPI or a private index (Nexus/Artifactory)
Optional modules
Optional — CI and team workflow
- Pre-commit linters/formatters (ruff/black) in a clean env
- Caching dependencies in CI; `pip --require-hashes` vs. `conda-lock`
- Private indexes: `--extra-index-url`, tokens and trust settings
Course Day Structure
- Welcome + goals (micro): 09:00–09:10
- Part 1: 09:10–10:20
- Break: 10:20–10:30
- Part 2: 10:30–11:40
- Break: 11:40–11:50
- Part 3: 11:50–13:00