Metadata-Version: 2.4
Name: k3modutil
Version: 0.1.8
Summary: Utilities for loading and inspecting Python submodules
Author-email: Zhang Yanpo <drdr.xp@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/pykit3/k3modutil
Project-URL: Documentation, https://k3modutil.readthedocs.io
Keywords: module,submodule,import,loader,introspection
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: coverage; extra == "dev"
Requires-Dist: k3ut; extra == "dev"
Provides-Extra: publish
Requires-Dist: build; extra == "publish"
Requires-Dist: twine; extra == "publish"
Requires-Dist: pk3; extra == "publish"
Provides-Extra: docs
Requires-Dist: mkdocs>=1.5; extra == "docs"
Requires-Dist: mkdocs-material>=9.0; extra == "docs"
Requires-Dist: mkdocstrings[python]>=0.24; extra == "docs"
Dynamic: license-file

# k3modutil

[![Action-CI](https://github.com/pykit3/k3modutil/actions/workflows/python-package.yml/badge.svg)](https://github.com/pykit3/k3modutil/actions/workflows/python-package.yml)
[![Documentation Status](https://readthedocs.org/projects/k3modutil/badge/?version=stable)](https://k3modutil.readthedocs.io/en/stable/?badge=stable)
[![Package](https://img.shields.io/pypi/pyversions/k3modutil)](https://pypi.org/project/k3modutil)

Submodule Utilities.

k3modutil is a component of [pykit3] project: a python3 toolkit set.




# Install

```
pip install k3modutil
```

# Synopsis

```python
import xml

import k3modutil

k3modutil.submodules(xml)
# {
#     'dom': <module 'xml.dom' from '...'>,
#     'etree': <module 'xml.etree' from '...'>,
#     'parsers': <module 'xml.parsers' from '...'>,
#     'sax': <module 'xml.sax' from '...'>,
# }

k3modutil.submodule_tree(xml)
# {
#     ...
#     'parsers': {
#         'module': <module 'xml.parsers' from '...'>,
#         'children': {
#             'expat': {
#                 'module': <module 'xml.parsers.expat' from '...'>,
#                 'children': None,
#             },
#         },
#     },
#     ...
# }

k3modutil.submodule_leaf_tree(xml)
# {
#     ...
#     'parsers': {
#         'expat': <module 'xml.parsers.expat' from '...'>,
#     },
#     ...
# }
```

#   Author

Zhang Yanpo (张炎泼) <drdr.xp@gmail.com>

#   Copyright and License

The MIT License (MIT)

Copyright (c) 2015 Zhang Yanpo (张炎泼) <drdr.xp@gmail.com>


[pykit3]: https://github.com/pykit3
