skillfed

importlib

Backport of importlib.import_module() from Python 2.7

importlib v1.0.4 341.3K downloads/30d#7,405 on PyPI1
License unclear Abandoned released

What it is and what it does

This package is a backport of the importlib module from Python 2.7's standard library, intended for use with older Python releases that do not include importlib natively. It provides the import_module() function, which allows dynamic module imports by name at runtime. The code is copied directly from Python 2.7 standard library.

The package is no longer maintained. Its own documentation states that because it targets only end-of-life Python versions, no further updates will be released. If you need bug fixes or compatibility patches, the maintainers recommend copying the files manually from Python 2.7 source. Modern Python versions include importlib in the standard library, making this backport unnecessary for any currently-supported environment.

Use it for:

  • Running legacy code on systems still using Python versions prior to 2.7 that rely on importlib.import_module().
  • Porting code to older environments where importlib is not yet available in the standard library.
  • Temporary compatibility layer when maintaining end-of-life Python deployments.

Worth the install?

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

Provides importlib.import_module() for Python versions prior to 2.7, backporting the standard library's dynamic import function to older Python releases.

No. This package targets only Python versions that are no longer supported and is itself abandoned. Modern Python includes importlib in the standard library. Install it only if you are maintaining legacy code on an end-of-life Python version and cannot upgrade—and even then, consider upgrading Python instead.

Install

importlib on PyPI

pip

pip install importlib

uv

uv add importlib

poetry

poetry add importlib

Installing importlib

Before you install

High install friction: the package is abandoned (last release 2016-08-31, last commit 2016-12-19) and explicitly states it will receive no further maintenance. It targets Python versions that are no longer supported.

License in practice

License treatment is unclear—no SPDX identifier or raw license text is provided in the package metadata, making it difficult to assess legal obligations before use.

Quickstart

pip install importlib==1.0.4
import importlib
module = importlib.import_module('os')

This package is only applicable to Python versions prior to 2.7 or Python 3.0; modern Python versions include importlib in the standard library and do not need this backport.

Verify before relying

  • Whether this package is safe to use with any currently-supported Python version, or only with end-of-life releases.
  • What the actual license is, given the metadata provides no SPDX identifier or raw license text.
  • Whether the code has been modified from the Python 2.7 source or remains an exact copy.

Package facts

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

Evidence: importlib-1.0.4.zip

Tags

importlib backportdynamic module importlegacy python importimport_module compatibilitypython backport import
legacyabandoned

More Software Development packages