$npx skillfedfor your agent

mo-imports

More Imports! - Delayed importing

With conditionsPyPI LibrariesReleased Jun 2025335.8K downloads / moMPL 2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — mo_imports-7.685.25166-py3-none-any.whl
v7.685.25166 · released 2025-06-15 · 1 runtime deps: mo-future

Yes, if you have circular dependencies in a modular codebase. The expect/export pattern is cleaner and more maintainable than inline imports or end-of-file imports, and the package is stable with low friction. The aging maintenance status (last release 425 days ago) is a minor concern for a mature utility, but check whether the pattern fits your use case—delay_import has limitations for non-callable values.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low install friction with a single lightweight dependency (mo-future).
  • Maintenance is aging—last release was 425 days ago, though the repository remains active and the package has been stable since its 2020 initial release.

License · maintenance · safety

MPL 2.0 (copyleft) — Licensed under MPL 2.0 (copyleft). You must disclose source code modifications and distribute under the same license if you modify and redistribute the package, but can use it in proprietary applications without disclosing your own code.

last release 2025-06-15 (425 days) · last repo commit 2025-06-15 · 2 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 335,768 downloads/mo, #7,472 on PyPI

Verify before relying

# Install
pip install mo-imports

# Use expect/export pattern to break cycles
# foos.py
from mo_imports import expect
bar = expect("bar")

# bars.py
from mo_imports import export
export("bars", bar)
  • Whether delay_import() works correctly with type checkers and IDE autocompletion
  • Performance overhead of expect/export pattern at scale with many circular dependencies
  • Compatibility with dynamic import systems or import hooks beyond standard Python imports
Same gist for agents: .md · .json

What it is and what it does

mo-imports solves the problem of circular module dependencies by providing two main patterns: expect/export for explicit cycle breaking, and delay_import for lazy loading. When modules import each other at the top level, Python can fail or produce incomplete initialization. This package lets you declare expected names upfront (expect) and fulfill them later (export), or defer imports until first use (delay_import), keeping all imports visible at the top of files rather than scattered inline or at the bottom.

The package depends only on mo-future and installs as a pure Python wheel with no compiled dependencies. It targets Python 3.9 through 3.13 and has been maintained since 2020, though releases have slowed. The expect/export pattern is the recommended approach for most cycles; delay_import is simpler but requires the imported name to be called or accessed to trigger loading, so it cannot be used for sentinel values or default arguments.

Use it for

  • Break circular imports in modular libraries where two or more modules need to reference each other's functions or classes.
  • Defer expensive imports (e.g., heavy data science or ML libraries) until they are actually used in a function.
  • Maintain clean import organization at the top of files while resolving cycles that would otherwise require inline or end-of-file imports.
  • Verify at module load time that all expected names are exported, catching configuration errors early rather than at runtime.
  • Refactor monolithic code into separate modules without restructuring to avoid cycles or keeping code in a single file.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you have circular dependencies in a modular codebase.

The expect/export pattern is cleaner and more maintainable than inline imports or end-of-file imports, and the package is stable with low friction. The aging maintenance status (last release 425 days ago) is a minor concern for a mature utility, but check whether the pattern fits your use case—delay_import has limitations for non-callable values.

Install

mo-imports on PyPI

Before you install

Low install friction with a single lightweight dependency (mo-future). Maintenance is aging—last release was 425 days ago, though the repository remains active and the package has been stable since its 2020 initial release.

License in practice

Licensed under MPL 2.0 (copyleft). You must disclose source code modifications and distribute under the same license if you modify and redistribute the package, but can use it in proprietary applications without disclosing your own code.

Quickstart

# Install
pip install mo-imports

# Use expect/export pattern to break cycles
# foos.py
from mo_imports import expect
bar = expect("bar")

# bars.py
from mo_imports import export
export("bars", bar)

Verify before relying

  • Whether delay_import() works correctly with type checkers and IDE autocompletion
  • Performance overhead of expect/export pattern at scale with many circular dependencies
  • Compatibility with dynamic import systems or import hooks beyond standard Python imports

Package facts

LicenseMPL 2.0 copyleft
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
mo-future
MaintenanceAging 425 days since the last release
Last repo commit
First released
Downloads335,768 / month, #7,472 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaLicense :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules

Evidence: mo_imports-7.685.25166-py3-none-any.whl

Tags

Capabilities
circular dependency resolutiondelayed import proxycyclic module importsexpect export patternlate binding importsmodule cycle breakingdeferred import loading
Topics
module-organizationimport-cycles

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 › “circular dependency resolution”

  • mo-importsProvides patterns to resolve circular module dependencies in Python…
  • rodiRodi is a dependency injection container for Python that resolves and…
  • cyclicDetects and reports cyclic relationships in a directed graph by…

Give your agent the search over MCP, or paste the wish link into any chat.

More Libraries packages

urllib3 Worth it
PyPI · Libraries · released May 2026

urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.

MITpure Python · 3.10+
1.8Bdownloads / mo
requests Worth it
PyPI · Libraries · released May 2026

Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.

Apache-2.0pure Python · 3.10+
1.8Bdownloads / mo
pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
python-dateutil Worth it
PyPI · Libraries · released Mar 2024

Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.

Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.

Apache-2.0pure Python
1.2Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.

MITpure Python
1.2Bdownloads / mo
pytest Worth it
PyPI · Libraries · released Jun 2026

pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.

MITpure Python · 3.10+
1.1Bdownloads / mo

See also py-import-cycles · cyclic · mo-future · import-deps · importlab · emport · pydeps · lazy-import · delayed-assert · lazy-imports