{"categories":[{"label":"Libraries","url":"https://skillfed.io/packages/category/software-development-libraries/6"},{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/13"}],"enrichment":{"capability":"Provides patterns to resolve circular module dependencies in Python through delayed imports and expect/export mechanisms, keeping imports at the top of files while breaking cycles.","skillfed_tags":["module-organization","import-cycles"],"use_cases":["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."],"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.\n\nThe 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.","worth_installing":"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\u2014delay_import has limitations for non-callable values."},"id":"mo-imports","links":{"html":"https://skillfed.io/packages/mo-imports","md":"https://skillfed.io/packages/mo-imports.md","pypi":"https://pypi.org/project/mo-imports/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2025-06-15","license_spdx":null,"license_treatment":"copyleft","name":"mo-imports","python_support":"unspecified","summary":"More Imports! - Delayed importing"},"popularity":{"monthly_downloads":335768,"position":7472,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"7.685.25166"}
