Summary and Setup
Welcome to Python packaging with pixi course !
This course is designed for intermediate Python user. It covers the basics of Python packaging and how to do that using pixi It is a roughly 2 hour course.
Learning Objectives
- Explain why packaging matters for reproducibility, versioning, and collaboration.
- Structure a Python project following modern best practices.
- Define clear and complete project metadata in pyproject.toml / pixi.toml.
- Manage dependencies and lockfiles using Pixi to ensure consistent environments.
- Build source and wheel distributions of a Python package..
- Publish a package to Test Python Package Index (TestPyPI) using Twine.
- Install a package from TestPyPI using pip.
Prerequisites
- Basic knowledge of Python
- Basic knowledge of GIT
- A GitHub account
- A PyPI or TestPyPI API token
Software Setup
Details
For this course, we will use GitHub Codespaces, which provides a cloud-based development environment that runs directly in your web browser.
This approach means that no software installation is required on your personal computer, making it much easier to get started.
Your Codespace environment will be Linux-based, so we will be using standard Linux commands and tools throughout the lessons.
Create a repository
Log into GitHub and create a new repository for this lesson called
greet_me
and add a Licence File when creating the repository.From the repository page, open the Code dropdown menu, select the Codespaces tab, and click Create codespace on main.
- Once your Codespace has been created, open the terminal inside it and run the following commands.
Run the following
OUTPUT
This script will automatically download and install Pixi (latest) for you.
Getting it from this url: https://github.com/prefix-dev/pixi/releases/latest/download/pixi-x86_64-unknown-linux-musl.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 23.2M 100 23.2M 0 0 24.0M 0 --:--:-- --:--:-- --:--:-- 66.9M
The 'pixi' binary is installed into '/home/codespace/.pixi/bin'
Updating '/home/codespace/.bashrc'
Please restart or source your shell.
If required, restart your shell:
Verify that Pixi has been installed correctly. Please note: the version number displayed may differ from the example below, as newer releases may have been published since this course was written.
OUTPUT
pixi 0.57.0