absolufy-imports
A tool to automatically replace relative imports with absolute ones.
Decision gist · record as of 2026-08-14
Yes, if you need to standardize imports and are willing to accept that the project is no longer maintained. The tool is simple, has no dependencies, and works for its narrow purpose on Python 3.6–3.10. Use it as part of a pre-commit workflow or one-time refactoring task, but do not expect updates for future Python versions.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with no runtime dependencies.
- The project is archived and has not been updated since 2022-01-20, though it remains functional for Python 3.6 through 3.10.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.
last release 2022-01-20 (1667 days) · last repo commit 2024-07-03 · 161 stars · archived
0 known vulnerabilities (OSV.dev, 2026-08-14) · 317,027 downloads/mo, #7,666 on PyPI
Alternatives
Verify before relying
pip install absolufy-imports
absolufy-imports myfile.py
# Or in .pre-commit-config.yaml:
# - repo: https://github.com/MarcoGorelli/absolufy-imports
# rev: v0.3.0
# hooks:
# - id: absolufy-imports- Whether the tool correctly handles all edge cases in modern Python import syntax.
- Compatibility with Python versions beyond 3.10 (classifiers list 3.10 as highest).
- Whether the tool works reliably on modern Python versions given the project has been archived since 2022-01-20.
What it is and what it does
absolufy-imports is a command-line tool and pre-commit hook that automatically rewrites relative imports as absolute imports. It operates on individual Python files and integrates into pre-commit workflows to enforce absolute import style across a codebase.
The tool supports configuration for non-standard layouts via the `--application-directories` flag, which lets you specify where your package root lives. It also offers a `--never` flag to reverse the operation and convert absolute imports back to relative. With no runtime dependencies, it installs quickly and runs as a standalone utility or integrated into your version control hooks.
Use it for
- Enforce absolute imports across a codebase as a pre-commit hook to maintain consistent import style.
- Refactor code that uses relative imports to absolute imports for better IDE support.
- Handle src-layout projects by specifying `--application-directories` to point to the correct root.
- Batch-convert relative imports in legacy Python code during a modernization effort.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to standardize imports and are willing to accept that the project is no longer maintained.
The tool is simple, has no dependencies, and works for its narrow purpose on Python 3.6–3.10. Use it as part of a pre-commit workflow or one-time refactoring task, but do not expect updates for future Python versions.
Install
absolufy-imports on PyPI
Before you install
Low install friction with no runtime dependencies. The project is archived and has not been updated since 2022-01-20, though it remains functional for Python 3.6 through 3.10.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.
Quickstart
pip install absolufy-imports
absolufy-imports myfile.py
# Or in .pre-commit-config.yaml:
# - repo: https://github.com/MarcoGorelli/absolufy-imports
# rev: v0.3.0
# hooks:
# - id: absolufy-imports
Verify before relying
- Whether the tool correctly handles all edge cases in modern Python import syntax.
- Compatibility with Python versions beyond 3.10 (classifiers list 3.10 as highest).
- Whether the tool works reliably on modern Python versions given the project has been archived since 2022-01-20.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.6.1 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Abandoned 1,667 days since the last release |
| Last repo commit | repository archived |
| First released | |
| Downloads | 317,027 / month, #7,666 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy |
Evidence: absolufy_imports-0.3.1-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “convert relative imports to absolute”
- absolufy-importsAutomatically converts relative imports to absolute imports in Python…
- protoletariatProtoletariat rewrites Python imports generated by protoc, converting…
- flake8-tidy-importsA flake8 plugin that detects and reports unnecessary import aliases,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Build Tools packages
Provides reusable utilities for Python packaging interoperability, including version handling, specifiers, markers, requirements, tags, and metadata parsing according to standards like PEP 440 and PEP 425.
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
pip is the standard installer for Python packages, enabling you to download and install packages from the Python Package Index and other indexes into your Python environment.
Hatchling is a standards-compliant Python build backend that handles packaging, metadata, and distribution of Python projects when configured in a project's pyproject.toml file.
Generates Python gRPC service stubs and message classes from Protocol Buffer definitions, enabling developers to build gRPC clients and servers.
pre-commit is a framework for installing and running git hooks written in any language before commits are made, automating code quality and validation checks across multi-language projects.
Install it if your team needs consistent, automated validation at commit time.
See also pyupgrade · reorder-python-imports · emport · protoletariat · flake8-tidy-imports · add-trailing-comma · ipynb · usort · lazy-imports · pre-commit-hooks