skillfed

python-gflags

Obsolete. Please migrate to absl-py instead.

python-gflags v3.1.2 340.5K downloads/30d#7,411 on PyPI189
Permissive license BSD Abandoned released

What it is and what it does

python-gflags is a command-line flag parsing library for Python that allows programs to define and process command-line arguments declaratively. It was originally developed by Google but has since been superseded and merged into the Abseil Python Common Libraries project.

The package is no longer maintained. The repository is archived, the last commit was in 2020, and the latest release dates to 2017. The package's own summary explicitly states it is obsolete and directs users to migrate to absl-py instead. Installing this package exposes you to an unmaintained codebase with no security updates or bug fixes.

Use it for:

  • Legacy systems still running code written against python-gflags that have not yet migrated to Abseil Python.
  • Temporary compatibility layer while transitioning an older codebase from python-gflags to absl-py.
  • Historical reference or educational purposes to understand how Google's original flag-parsing approach worked.

Worth the install?

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

Parses command-line flags and arguments for Python programs, but this package is obsolete and unmaintained—its functionality has been merged into Abseil Python.

No. This package is explicitly obsolete and unmaintained. The maintainers direct all users to migrate to Abseil Python instead. Do not install for new projects. Only consider it if you are maintaining legacy code that has not yet migrated, and treat migration as urgent.

Install

python-gflags on PyPI

pip

pip install python-gflags

uv

uv add python-gflags

poetry

poetry add python-gflags

Installing python-gflags

Before you install

High install friction and abandoned maintenance status. The repository was archived in 2020, with no commits since 2020-07-03 and no releases since 2017-10-27. The package itself explicitly directs users to migrate to Abseil Python instead.

License in practice

BSD license permits permissive use, but this is moot given the package's obsolete status and explicit recommendation to migrate.

Quickstart

pip install python-gflags==3.1.2
import gflags
FLAGS = gflags.FLAGS
FLAGS.define_string('name', 'World', 'A name to greet.')

Package is unmaintained and explicitly deprecated in favor of Abseil Python; new projects should not use it.

Verify before relying

  • Whether any active projects still depend on this package and what their migration timeline is.
  • Whether the high install friction reflects unresolved build issues or merely reflects the tar.gz distribution format.

Package facts

License BSD (permissive)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance abandoned — 3,213 days since the last release
Last repo commit (repository archived)
First released
Downloads 340,454/month — #7,411 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: python-gflags-3.1.2.tar.gz

Intended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Topic :: Software Development :: Libraries :: Python Modules

Tags

command-line flag parsingargument parsing librarygflags pythonCLI argument handlingcommand line options parser
deprecatedlegacy

More Python Modules packages