Skip to main content

ModX — The Python Module Universe at Your Fingertips

Project description

🌟 ModXPy — The Python Module Universe at Your Fingertips

Welcome to ModXPy, the ultimate playground for Python’s modules.
With ModXPy you can instantly import, explore, and experiment with the entire Python standard library — plus any installed third-party modules — all from one simple interface.

UPDATE 2.4.0

NEW FUNCTION!

whyloaded(module)

Shows why a specific module was loaded. 8 possible reasons:

preloaded: This module was preloaded into shell globals.

user: This module was imported by you directly. Swallows "referenced" tag.

referenced: This modules was imported by you, but already preloaded.

modx: This module was imported by one of ModX's importing functions.

modx_dep: This module was loaded because it was a dependency of ModX.

dependency: Another module you have imported depended on this module (not you nor ModX).

not_loaded: given module wasn't imported into shell globals; either not a module or not imported yet.

unknown: This module was imported for a reason that isn't any of the above.

🚀 Installation and Importing

IMPORTANT: Before you install ModX, you MUST first (if not already) run "pip install packaging" inside of powershell/terminal. ModX will NOT work without the packaging module.

Install directly from terminal.

Type: "pip install modxpy"

In Python, import as import modx (not modxpy)

Functions:

🔹 dependencies(module)

Shows what other modules a specific module depends on without importing it.

🔹 importall(show_imported=False)

Imports about every standard library module at once.

🔹 importexternal(show_imported=False)

Attempts to import every third-party module you currently have installed.

🔹 importletter(letter, show_imported=False)

Imports all standard library modules whose names start with the given letter (case-insensitive).

🔹 importlog(include_deps=False)

Shows every module imported since ModX loaded in CHRONOLOGICAL order.

include_deps=True: Includes ModX's dependencies in the list.

🔹 importrandom(n, strict_mode=False, show_imported=False)

Imports n random stdlib modules.

strict_mode=False: May import less than n due to dependencies.

strict_mode=True: Forces import until EXACTLY n NEW modules.

🔹 importscreen(show_imported=False)

Imports every module that uses a screen/GUI (like pygame or turtle).

🔹 info(module_name)

Shows basic info about a module: file path, built-in status, docstring snippet.

🔹 isimported(module)

Checks if a module is currently imported into the Python shell (not just sys.modules).

🔹 listimportall()

Returns a list of modules that import_all() would import.

🔹 modbench(module)

Shows how much time and memory a module takes to import.

Note: The typed module DOES get imported.

🔹 modclasses(module)

Shows how many and what classes a module has WITHOUT importing it.

🔹 modfunctions(module)

Shows how many and what functions a module has WITHOUT importing it.

🔹 modglobals(module, show_private=False, export=None)

Shows a module's global names (not functions/classes/modules).

show_private=True: Includes names starting with '_'.

export=filename.md: Exports results as Markdown.

🔹 modorigin(module)

Shows where a module came from (e.g., built-in, standard library, or pip-installed).

🔹 modsloaded()

Shows how many modules are currently loaded in your Python session.

🔹 modxhelp(export=None, compact=False, banner=True)

Shows ModX's built-in help dialogue.

export=filename.md: Exports help as Markdown.

compact=True: Shows single-line summaries only.

banner=False: Hides the ASCII banner.

🔹 modximported()

Lists modules that were ONLY imported by ModX — NOT including user imports or dependencies.

🔹 nonimported()

Returns a list of STANDARD LIBRARY modules that have NOT been imported yet.

🔹 preloaded(show_builtins=True, show_internal=False, show_submodules=False)

Shows modules pre-loaded by Python before ModX started.

show_builtins=False: Hides built-in modules.

show_internal=True: Shows modules starting with '_'.

show_submodules=True: Includes submodules (names with '.').

🔹 revdeps(module)

Shows what modules import the given module WITHOUT importing it.

🔹 searchmodules(keyword)

Searches for modules whose names contain the keyword.

🔹 vcompat(module_name, python_version=None)

Checks if a module is compatible with a given Python version.

If no version is given, sweeps ALL Python versions 2.0–3.12.

🔹 whyloaded(module)

Returns a comma-separated string explaining why a module is in memory.

Tags: not_loaded, preloaded, user, referenced, modx, modx_dep, dependency or unknown

Rule: user swallows referenced.

Note: For functions who have a show_imported parameter, if it is True,

then it will show what this function imported, otherwise it won't.

💡 Why Use ModX?

1.) Explore the Python standard library in seconds 2.) Stress-test your environment by bulk importing modules 3.) See hidden dependencies that load behind the scenes 4.) Experiment with random imports for fun or testing 5.) Discover new modules you didn’t know existed

ModXPy turns Python’s module system into a playground — perfect for learning, testing, or just satisfying your curiosity. Install it today with pip install modxpy, import it with import modx, and start discovering how many modules Python already has waiting for you!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

modxpy-2.4.0.tar.gz (21.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

modxpy-2.4.0-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file modxpy-2.4.0.tar.gz.

File metadata

  • Download URL: modxpy-2.4.0.tar.gz
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for modxpy-2.4.0.tar.gz
Algorithm Hash digest
SHA256 3ec8c2e2ab88af0bf0a4225595ed4709e0ac7658222960b2a862964e86fc6492
MD5 1e40e98867c61fbb10d24293053542fa
BLAKE2b-256 f725a356ea38c49c9fdb9a882595e194323d9cd51db13cfe703d9f8963bb6e75

See more details on using hashes here.

File details

Details for the file modxpy-2.4.0-py3-none-any.whl.

File metadata

  • Download URL: modxpy-2.4.0-py3-none-any.whl
  • Upload date:
  • Size: 19.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for modxpy-2.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 616c59654af48a01aaf146196b47e036710d99a45678dadca1c2e0f27bf6f782
MD5 9733f8329a4e1c5816d74b029d587acb
BLAKE2b-256 d43d8aded1c1f9f829924dce97ffc8a43abff2a37843b5002f8bcf69f27a62f9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page