skillfed

flit

A simple packaging tool for simple packages.

flit v4.0.2 17.2M downloads/30d#1,128 on PyPI2,252
Permissive license BSD-3-Clause Active released

What it is and what it does

Flit is a packaging tool designed to reduce friction when publishing Python modules and packages to PyPI. It extracts package metadata—name, version, and description—directly from your module's docstring and __version__ attribute, eliminating the need to maintain that information in separate configuration files. You initialize a project with `flit init` to generate a minimal pyproject.toml, then use `flit publish` to upload to PyPI.

The tool is aimed at developers who want a straightforward path from a working module to a published package without wrestling with setuptools configuration. It handles wheel building automatically and can also install packages locally for development. Flit packages a single importable module or package at a time, automatically including all subpackages and data files within it.

Use it for:

  • Publishing a simple single-file Python module to PyPI with minimal metadata boilerplate
  • Setting up a new package project quickly using flit init to generate pyproject.toml
  • Installing your own package locally in editable mode during development
  • Converting legacy flit.ini configurations to modern pyproject.toml format
  • Distributing Python 2 modules that remain importable on Python 3

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Flit is a Python packaging tool that simplifies creating and publishing packages to PyPI by extracting metadata from module docstrings and version attributes instead of requiring separate configuration.

Yes. Flit is actively maintained, has no known vulnerabilities, and is widely used (top 5000 on PyPI). Install it if you're publishing a straightforward Python package and want to avoid setuptools complexity; it's particularly valuable for single-module projects or when you prefer declarative metadata in pyproject.toml.

Install

flit on PyPI

pip

pip install flit

uv

uv add flit

poetry

poetry add flit

Installing flit

Before you install

Low friction installation with a pure-Python wheel. Actively maintained with a recent release (10 days old) and steady commit activity. Depends on flit_core, requests, docutils, tomli-w, and pip—all standard ecosystem tools.

License in practice

BSD-3-Clause is permissive; you can use Flit in commercial and proprietary projects without restriction, though you must include the license notice.

Quickstart

pip install flit

flit init  # in your module directory
flit publish  # upload to PyPI

Requires Python 3.8 or later; your module's docstring must start with a one-line summary and include a __version__ attribute.

Verify before relying

  • Whether Flit supports building binary extensions or only pure-Python packages
  • Performance characteristics when packaging large projects with many subpackages

Package facts

License BSD-3-Clause (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 5 — flit_core, requests, docutils, tomli-w, pip
Maintenance actively maintained — 10 days since the last release
Last repo commit
First released
Downloads 17,196,538/month — #1,128 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: flit-4.0.2-py3-none-any.whl

Intended Audience :: DevelopersProgramming Language :: Python :: 3Topic :: Software Development :: Libraries :: Python Modules

Tags

python package publishing toolpypi packaging simplifiedflit packagingpython module to pypiminimal packaging setuppython package distributionpyproject.toml builder
packagingpypi-publishingbuild-tool

More Python Modules packages