3. Introduction Python Development and Packages

J. Hathaway

This week’s plan

  • Tuesday: Planning our Package ideas.
  • Thursday: Introduction to Python Tooling (Today)
  • Tuesday: Introduction to Python packages (Thursday)

Today’s agenda

  • Discuss reading assignments and class assignments at the end of class
  • Getting our Python Paradigm straight
  • Introduction to uv, virtual environments, and VS Code setup
  • Introduction to Python packages

Explore Tooling in Python

  • What is uv and why should we use it?

  • What are python packages/projects and why should we use them?

  • How do we create a python package/project?

  • What is different from the R experience?

Exploring uv

Building or first Python package

Explore our template repo

  • Where are the python functions for the package?
  • Where is the documentation?
  • Let’s see if we can build our python simplemaths functions.
  • What do we need to change for this package to work?

Class Assignments

  1. Make sure your environment is setup and that you can publish to GitHub pages
  2. Read through The Python Package book
  • Note: We are using uv instead of poetry.
  • Note: We are using mkdocs-meterial for documentation instead.
  1. Create your own package repository for your personal Python package.