An open API service indexing awesome lists of open source software.

https://github.com/henryiii/writing-python

Tutorial on writing Python
https://github.com/henryiii/writing-python

Last synced: 2 months ago
JSON representation

Tutorial on writing Python

Awesome Lists containing this project

README

          

## Writing Software in Python

## Outline

The focus today: learning how to go from research code to something reusable with structure.

We are also trying not to overlap with the packaging session tomorrow! Be sure to visit that one too.

- Scripts instead of notebooks
- Writing a CLI (built-in)
- Scripts with dependencies
- Writing a CLI (using a dependency)
- Tools for packaging
- Making a reproducible environment
- Task runners

## Installation

I recommend doing this on your computer, so you'll have something to take home. Let's install:

- uv: Brew (macOS), pipx, command line:
- pixi: Brew (macOS), command line:
- nox: Brew (macOS), pipx

Optional:

- pipx: Brew (macOS), pip, etc:
- Python launcher for Unix: Brew, command line:

## Running the slides

```bash
uv tool install jupyterlab --with jupyterlab_rise --with jupyterlab_code_formatter
jupyter-lab .
```