Skip to content

Commit

Permalink
Start a utility libraries page. (#328)
Browse files Browse the repository at this point in the history
Start a utilities page rather than solving #304 as-requested.

As I said in the ticket: I'm 👎 about adding these kinds of dependencies
to our template. Not least because not everyone _needs_ a logger, but
also because these choices feel out-of-scope. We probably _should_
highlight libraries that we like and prefer to the builtins.

I've added my opinions, such as they are. Challenges are welcome.

## Closes
- #304.

---------

Co-authored-by: Patrick J. Roddy <patrickjamesroddy@gmail.com>
  • Loading branch information
samcunliffe and paddyroddy authored Mar 25, 2024
1 parent 036c1e9 commit 52bf5e6
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions docs/pages/utilities.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: Utility libraries
layout: default
---

# Utility libraries

Useful packages for _utility_ functionality, normally we highlight these if
we've found a library that we prefer to Python's builtin. You probably don't
want to write these yourself but might need logging or a command-line interface.

## Command-line interface

| Name | Short description | 🚦 |
| ----------------------------------------------------------- | ------------------------------------------------------------------------------ | :-: |
| [typer](https://typer.tiangolo.com/) | A user-friendly and intuitive CLI system. Built on click. | 🟢 |
| [click](https://click.palletsprojects.com/) | Makes nice-looking CLIs, and more configurable than argparse. Uses decorators. | 🟠 |
| [argparse](https://docs.python.org/3/library/argparse.html) | Python's builtin CLI system uses object configuration. | 🟠 |
| [optparse](https://docs.python.org/3/library/optparse.html) | A now-deprecated CLI system built into Python. | 🔴 |

## Logging

| Name | Short description | 🚦 |
| --------------------------------------------------------- | -------------------------------------------------------------------- | :-: |
| [loguru](https://loguru.readthedocs.io/) | Simple and user-friendly with many nice features enabled by default. | 🟢 |
| [logging](https://docs.python.org/3/library/logging.html) | Python's builtin logging framework. Needs some configuration. | 🟠 |

0 comments on commit 52bf5e6

Please sign in to comment.