flit
A simple packaging tool for simple packages.
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 flituv
uv add flitpoetry
poetry add flitInstalling 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
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
flit-coreFlit-core provides the build backend for…
permissive · top 1,000 on PyPI
flit-scmflit_scm is a PEP 518 build backend that…
permissive · top 15,000 on PyPI
jupyter-packagingProvides build tools and utilities for…
permissive · top 5,000 on PyPI
poetryPoetry is a dependency management and packaging…
permissive · top 1,000 on PyPI
sampleprojectA minimal reference implementation…
permissive · top 15,000 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
single-sourceExtracts your package version from…
permissive · top 15,000 on PyPI
pkg-aboutRetrieves Python package metadata at runtime in…
permissive · top 15,000 on PyPI
devpi-clientdevpi-client is a command-line tool for…
permissive · top 15,000 on PyPI
dprint-pydprint-py is a Python wrapper for dprint, a…
permissive · top 15,000 on PyPI