Skip to content

What is a Python application?

A Python application is a program that end users run directly. A web server, a CLI tool, a data pipeline, a desktop GUI: these are applications. The defining trait is that the code is the final product, not a building block for other code.

A Python package, by contrast, is code designed to be imported by other Python programs. Django is a package; the Django-powered website you deploy is an application. Requests is a package; the script that calls requests.get() to pull data from an API is an application.

The line between them is not always sharp. A CLI tool can also expose a public API. A data analysis library can ship a standalone notebook server. But the distinction matters because it changes how you manage dependencies, pin versions, and distribute the result.

Why the distinction matters for tooling

Applications and packages make different promises about their dependencies.

A package must be flexible. It declares version ranges (e.g. requests>=2.28) so it can coexist with whatever else the consumer’s project installs. Pinning exact versions in a package would force every downstream user onto those versions, creating conflicts.

An application can be exact. It is the top of the dependency tree, so it controls which versions get installed. This is why applications use lockfiles to record the precise version of every direct and transitive dependency. A lockfile makes deployments reproducible: the same versions install on every developer’s machine, in CI, and in production.

uv reflects this split in its project setup. Running uv init creates an application project by default, with a uv.lock file tracking exact versions. Running uv init --lib creates a library project instead. Both use pyproject.toml for configuration, but the lockfile workflow and the build metadata differ.

How applications get to users

Packages have one main distribution channel: a package index like PyPI. Users install them with pip or uv and import them in their own code.

Applications have many. A web service gets deployed to a server or container. A CLI tool might be published to PyPI and run with uvx, or bundled into a standalone executable with PyInstaller. A desktop app might ship as a .exe or .app. A data pipeline might run inside a virtual environment on a shared server.

Each distribution channel has different requirements for how dependencies are bundled, how the Python interpreter is provided, and how updates reach the user. How do I ship a Python application to end users? covers the 2026 options in detail.

Learn More

Last updated on