Using Python Tools

Last updated on 2025-08-13 | Edit this page

Estimated time: 12 minutes

Overview

Questions

  • What is a Python tool?
  • How can I install and run a Python tool?

Objectives

  • Install and run a Python tool with uv.

What is a Python tool?


A Python tool is just a Python package that provides a command line interface (CLI). These tools can be run directly with uv or installed globally just like any other command line application.

Run a Python Tool with uv


The pycowsay package provides a command line interface for a talking cow based on text provided by the user. The uv command shown below will run the pycowsay tool with the provided text:

BASH

uv tool run pycowsay hello there!

The output from running this command is shown below:

  ------------
< hello there! >
  ------------
   \   ^__^
    \  (oo)\_______
       (__)\       )\/\
           ||----w |
           ||     ||

An equivalent command to uv tool run is uvx which is demonstrated below.

BASH

uvx pycowsay hello there!
  ------------
< hello there! >
  ------------
   \   ^__^
    \  (oo)\_______
       (__)\       )\/\
           ||----w |
           ||     ||

Install a Python Tool with uv


Use the uv install command to globally install a Python tool on your system. To demonstrate this, the command shown below installs the genja tool which is a static website generator built with Python.

BASH

uv tool install genja

The genja tool can now be directly run from the command line without invoking uv such as:

BASH

genja --version

This will output the following:

25.3

Use the list command to show all the tools installed by uv:

BASH

$ uv tool list

genja v25.3.1
- genja 

Here is a demonstration of using uv to work with Python tools.

Key Points
  • A Python package with a command-line interface is a Python tool.
  • A Python tool can be installed, run, and managed with the uv tool subcommand.