> built 2026-11-21 18:29 UTC from 8d0c2b9 (master) · unbox 0.1.15. Details: build_info.json

# index.html.md

<!-- generated by epythet -->

# unbox

Finding imports in code

To install:	`pip install unbox`

# What’s here

Lots of little goodies to help you analyze the imports of your, or others’ code.

## Getting a list of missing dependencies

```python
>>> from unbox import print_missing_names
>>> import some_module
>>> print_missing_names(some_module)
SoundFile
i2
librosa
pyttsx3
slink
```

These are the names a package imports but doesn’t declare. The declared names are
read from the package’s `pyproject.toml` (PEP 621 `[project] dependencies`), falling
back to `setup.cfg` (`[options] install_requires`) for legacy projects:

```python
>>> import unbox
>>> unbox.find_install_names(unbox)
['findimports', 'dol>=0.3.49', 'importlib_resources', 'config2py', 'py2store', 'xdol']
```

Use `unbox.module_requirements_according_to_pyproject(pkg, extras=True)` if you also
want the `[project.optional-dependencies]` groups.

## Seeing what the dependencies of a package are, before installing it

Simply get a list of dependencies for a package from PyPI.

```python
>>> import unbox
>>> unbox.dependencies_from_pypi('pandas')
['numpy', 'numpy', 'python-dateutil', 'pytz', 'tzdata']
```

But you have control over the requirements that are returned,
and how they are returned:

```python
>>> it = unbox.dependencies_from_pypi(
...     'pandas',
...     requirement_filter=lambda x: True,  # don't filter any requirements
...     requirement_trans=lambda x: x,  # as is
...     egress = lambda x: x  # just get the iterator as is
... )
>>> next(it)
'numpy>=1.22.4; python_version < "3.11"'
>>> list(it)[-1]
'zstandard>=0.17.0; extra == "all"'
```

## A dict-like interface

The base of `unbox` is just the `dol` interface to `findimports`, which then allows us to offer a bunch of functionalities easily.

Say you wanted to know what dol was made of.
The dol way of doing this is to make a `Mapping` (i.e. a key-value dict-like interface),
and then do what you do with dicts…

```python
>>> import dol
>>> import unbox
>>> s = unbox.ModuleNamesImportedByModule(dol)  # make a store containing the modules of the `dol` package
>>> # Now wee how you can do things you do with dicts
>>> len(s)
15
>>> list(s)
['dol.__init__',
 'dol.appendable',
 'dol.base',
 'dol.caching',
 'dol.core',
 'dol.dig',
 'dol.errors',
 'dol.filesys',
 'dol.mixins',
 'dol.naming',
 'dol.paths',
 'dol.signatures',
 'dol.sources',
 'dol.trans',
 'dol.util']
>>> 'dol.appendable' in s
>>> # The values of `s` are sets of modules imported by a module.
>>> s['dol.appendable']  # what does dol.appendable import?
{'collections.abc', 'dol.trans', 'time', 'types', 'typing'}
```

Check out `ModulesImportedByModule` also, which gives you a `Mapping` with module objects
as keys, and `findimports.ImportInfo` instances as values.

## imports_for

As an example of what you can do with this set up, have a look at `imports_for`.
Or don’t have a look; just use it, since it’s quite useful.

```python
from unbox import imports_for
import wave

assert {"collections", "struct", "sys"}.issubset(imports_for(wave))
```

Note that we only check a subset here: what a stdlib module imports changes
between python versions (py3.10’s `wave` imports `audioop` and `chunk`, both
removed in 3.13, while py3.12’s imports `uuid`).

At it’s base, imports_for gives you a generator of import names.
With the `post` argument (defaulted to `set`) you can specify a callable that can produce the output
you want; whether you want to filter the items, count them, order them, etc.

We curried a few common ones for you, for your convenience:

```python
from unbox import imports_for

imports_for.counter  # imported names and their counts
imports_for.most_common  # imported names and their counts, ordered by most common
imports_for.first_level  # set for imported first level names (e.g. 'os' instead of 'os.path.etc.)
imports_for.first_level_count  # count of imported first level names (e.g. 'os' instead of 'os.path.etc.)
imports_for.third_party  # imported (first level) names that are not builtin names (most probably third party packages)"
imports_for.runtime  # like third_party, but ignoring the imports made only by the package's own tests
```

### Test-only imports

By default `imports_for` scans *every* module under the root, so a package with an
in-package `tests/` folder will list `pytest` (and friends) amongst its imports –
and `print_missing_names` will then report them as missing *install* requirements,
though they’re only needed to develop the package, not to run it.

Scoping those out is opt-in (the default is unchanged):

```python
imports_for.runtime(some_package)  # third-party imports, minus the test-only ones
print_missing_names(some_package, exclude_tests=True)
```

What counts as a test module is `unbox.DFLT_TEST_MODULE_PATTERNS` – fnmatch patterns
matched against each segment of the dotted module name. For anything else, pass your
own `exclude` (patterns and/or predicates on the full dotted name) to `imports_for`:

```python
imports_for.third_party(
    some_package, exclude=("tests", "scrap", lambda name: "examples" in name)
)
```

## Collections of python names

Check out the contents of these collections:

```python
from unbox import (
    builtin_module_names,
    scanned_standard_lib_names,
    all_accessible_modules,
    all_accessible_pkg_names,
    all_accessible_non_pkg_module_names,
    builtin_obj_names,
    python_names,
)
```

For example, `builtin_module_names` will be a set of names that are
[documented]() **and** importable on your system.

The `scanned_standard_lib_names` set is similar, but the names are obtained by scanning
the local standard library file names – so include things like easter eggs (`this`, `antigravity`).

`all_accessible_modules` will be the list of all modules accessible in your python path.

And so on…

<p class="epythet-aggregates">This documentation as a single file: <a href="unbox.md">unbox.md</a> (Markdown, for agents).</p>


# _autosummary/unbox.base.html.md

# unbox.base

Base functionality of unbox

### Module Attributes

| [`ModuleNameFilter`](_autosummary/unbox.base.html.md#unbox.base.ModuleNameFilter)   | an fnmatch pattern for a dotted-name segment, or a predicate on the full dotted module name.   |
|---------------------------------------------------------------------|------------------------------------------------------------------------------------------------|

### Functions

| [`documented_builtin_module_names`](_autosummary/unbox.base.html.md#unbox.base.documented_builtin_module_names)()          | Will yield from a prepopulated list of builtin module (and submodule) names for the environment's python version.   |
|---------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------|
| [`imports_for`](_autosummary/unbox.base.html.md#unbox.base.imports_for)(root[, post, exclude])         | Get imported strings.                                                                                               |
| `is_importable`(name)                                                                       |                                                                                                                     |
| `modname_to_modobj`(self, modname)                                                          |                                                                                                                     |
| `modobj_to_modname`(self, modobj)                                                           |                                                                                                                     |
| [`resolve_rootpath`](_autosummary/unbox.base.html.md#unbox.base.resolve_rootpath)(obj)                      | Resolve `obj` to an existing filesystem path.                                                                       |
| [`scan_locally_for_standard_lib_names`](_autosummary/unbox.base.html.md#unbox.base.scan_locally_for_standard_lib_names)([...]) | Generates names of standard libs from python environment it was called from.                                        |

### Classes

| [`ModuleImports`](_autosummary/unbox.base.html.md#unbox.base.ModuleImports)                                |                                                |
|-----------------------------------------------------------------------------------------------|------------------------------------------------|
| [`ModuleNamesImportedByModule`](_autosummary/unbox.base.html.md#unbox.base.ModuleNamesImportedByModule)(root[, ...])     | Store of module names imported by some module. |
| [`ModulesColl`](_autosummary/unbox.base.html.md#unbox.base.ModulesColl)(root[, trackUnusedNames, ...])   |                                                |
| [`ModulesImportedByModule`](_autosummary/unbox.base.html.md#unbox.base.ModulesImportedByModule)(root[, ...])         |                                                |
| [`MyModuleGraph`](_autosummary/unbox.base.html.md#unbox.base.MyModuleGraph)(root[, trackUnusedNames, ...]) |                                                |

### unbox.base.ModuleImports

alias of [`ModuleNamesImportedByModule`](_autosummary/unbox.base.html.md#unbox.base.ModuleNamesImportedByModule)

### unbox.base.ModuleNameFilter

an fnmatch pattern for a dotted-name segment, or a
predicate on the full dotted module name.

* **Type:**
  An `exclude` element

alias of [`str`](https://docs.python.org/3/builtins/stdtypes.html#str) | [`Callable`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable)[[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)], [`bool`](https://docs.python.org/3/builtins/functions.html#bool)]

### *class* unbox.base.ModuleNamesImportedByModule(root, trackUnusedNames=False, all_unused=False, external_dependencies=True, warn_about_duplicates=False, verbose=False, ignore_parse_path_warnings=False)

Bases: `Store`

Store of module names imported by some module.

### *class* unbox.base.ModulesColl(root, trackUnusedNames=False, all_unused=False, external_dependencies=True, warn_about_duplicates=False, verbose=False, ignore_parse_path_warnings=False)

Bases: `Collection`

### *class* unbox.base.ModulesImportedByModule(root, trackUnusedNames=False, all_unused=False, external_dependencies=True, warn_about_duplicates=False, verbose=False, ignore_parse_path_warnings=False)

Bases: `KvReader`, [`ModulesColl`](_autosummary/unbox.base.html.md#unbox.base.ModulesColl)

### *class* unbox.base.MyModuleGraph(root, trackUnusedNames=False, all_unused=False, external_dependencies=True, warn_about_duplicates=False, verbose=False, ignore_parse_path_warnings=False)

Bases: `ModuleGraph`

### unbox.base.documented_builtin_module_names()

Will yield from a prepopulated list of builtin module (and submodule) names for the environment’s python version.

These were parsed from `https://docs.python.org/{version}/library/` and saved in package’s data
(this data, for all supported versions, can be found here
too: [https://github.com/i2mint/unbox/tree/master/unbox/data/standard_lib_names](https://github.com/i2mint/unbox/tree/master/unbox/data/standard_lib_names))

Supported python versions: ‘2.7’, ‘3.5’, ‘3.6’, ‘3.7’, ‘3.8’, and ‘3.9’

I python version not supported, will return an empty set (with a warning).

#### SEE ALSO
scan_locally_for_standard_lib_names

### unbox.base.imports_for(root, post=<class 'set'>, \*, exclude=())

Get imported strings.

* **Parameters:**
  * **root** – Module, package, or filepath/folderpath thereof.
  * **post** – Postprocess iterable. For example:
    `set`, when order and repetition doesn’t matter
    `collections.Counter`, to count number of modules where the module is imported,
    `lambda module: set(x.split('.')[0] for x in module)` if you only care about the top level package
  * **exclude** ([`Iterable`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterable)[[`Union`](https://docs.python.org/3/library/typing.html#typing.Union)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str), [`Callable`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable)[[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)], [`bool`](https://docs.python.org/3/builtins/functions.html#bool)]]]) – Modules to leave out of the scan, as fnmatch patterns matched
    against each segment of the dotted module name (e.g. `'tests'`,
    `'test_*'`) and/or predicates on the full dotted name. Empty (the
    default) means “scan everything”, which is what `unbox` has always done.
    See `DFLT_TEST_MODULE_PATTERNS` and the `imports_for.runtime` preset.
* **Returns:**

```pycon
>>> import wave
>>> imports = imports_for(wave)
>>> sorted({'collections', 'struct', 'sys'} & imports)
['collections', 'struct', 'sys']
```

#### NOTE
only a version-stable subset of `wave`’s imports is asserted here –
py3.10’s `wave` imports `audioop` and `chunk` (both removed in 3.13),
while py3.12’s imports `uuid` instead.

An in-package `tests/` imports things (`pytest`, `hypothesis`, …) that
the package doesn’t need at runtime; `imports_for.runtime` is the preset that
scopes them out (see `DFLT_TEST_MODULE_PATTERNS`).

### unbox.base.resolve_rootpath(obj)

Resolve `obj` to an existing filesystem path.

`obj` can be a module object, a module name, or a path (in which case it is
returned as-is). A *package* resolves to its directory, while a plain
(non-package) module resolves to its `.py` file.

```pycon
>>> import wave  # a plain module: has __file__ but no __path__
>>> resolve_rootpath(wave).endswith('wave.py')
True
>>> import unbox  # a package: has a __path__
>>> resolve_rootpath(unbox).endswith('unbox')
True
```

* **Return type:**
  [`str`](https://docs.python.org/3/builtins/stdtypes.html#str)

### unbox.base.scan_locally_for_standard_lib_names(include_underscored=True)

Generates names of standard libs from python environment it was called from.

* **Parameters:**
  **include_underscored** – Whether to include names that start with underscore or not.
  :keyword standard lib, builtins

#### SEE ALSO
documented_builtin_module_names

```pycon
>>> standard_lib_names = set(scan_locally_for_standard_lib_names(include_underscored=True))
>>> # verify that a few known libs are there (including three folders and three py files)
>>> assert {'collections', 'asyncio', 'os', 'dis', '__future__'}.issubset(standard_lib_names)
>>> # verify that other unwanted "decoys" are NOT in there
>>> assert {'__pycache__', 'LICENSE.txt', 'config-3.8-darwin', '.DS_Store'}.isdisjoint(standard_lib_names)
```


# _autosummary/unbox.dependencies.html.md

# unbox.dependencies

Functions to check for dependencies.

### Functions

| [`dependencies_from_pypi`](_autosummary/unbox.dependencies.html.md#unbox.dependencies.dependencies_from_pypi)(package_name, \*[, ...])   | Simply get a list of dependencies for a package from PyPI.   |
|----------------------------------------------------------------------------------------------------|--------------------------------------------------------------|
| `pypi_package_data`(package_name)                                                                  |                                                              |
| [`pypi_requires_dist`](_autosummary/unbox.dependencies.html.md#unbox.dependencies.pypi_requires_dist)(package_name)                  | Fetch dependencies for a package from PyPI.                  |

### unbox.dependencies.dependencies_from_pypi(package_name, \*, requirement_filter=<function <lambda>>, requirement_trans=<function <lambda>>, egress=<class 'list'>)

Simply get a list of dependencies for a package from PyPI.

```pycon
>>> dependencies_from_pypi('pandas')
['numpy', 'numpy', 'python-dateutil', 'pytz', 'tzdata']
```

But you have control over the requirements that are returned,
and how they are returned:

```pycon
>>> it = dependencies_from_pypi(
...     'pandas',
...     requirement_filter=lambda x: True,  # don't filter any requirements
...     requirement_trans=lambda x: x,  # as is
...     egress = lambda x: x  # just get the iterator as is
... )
>>> next(it)
'numpy>=1.22.4; python_version < "3.11"'
>>> list(it)[-1]
'zstandard>=0.17.0; extra == "all"'
```

### unbox.dependencies.pypi_requires_dist(package_name)

Fetch dependencies for a package from PyPI.

* **Parameters:**
  **package_name** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Name of the package to fetch dependencies for.
* **Returns:**
  Dictionary containing package dependencies.
* **Return type:**
  [`dict`](https://docs.python.org/3/builtins/stdtypes.html#dict)


# _autosummary/unbox.html.md

# unbox

Finding imports in code etc.

`get_import_names`: Getting the names that are imported.

`install_names_for_imports`: pip_install name for given import name (if different
and listed in our data)

`find_install_names`: Getting a package’s declared deps, from its
`pyproject.toml` or (legacy) `setup.cfg`

`module_requirements_according_to_pyproject`: Getting deps from pyproject.toml file

`module_requirements_according_to_setupcfg`: Getting deps from setup.cfg file

`print_missing_names`: Print the difference between required names and imported (
install) names

### Modules

| [`base`](_autosummary/unbox.base.html.md#module-unbox.base)                                   | Base functionality of unbox          |
|-----------------------------------------------------------------------------------------------------------|--------------------------------------|
| [`dependencies`](_autosummary/unbox.dependencies.html.md#module-unbox.dependencies)                   | Functions to check for dependencies. |
| [`missing_install_names`](_autosummary/unbox.missing_install_names.html.md#module-unbox.missing_install_names) | Finding missing install names        |
| [`recipes`](_autosummary/unbox.recipes.html.md#module-unbox.recipes)                             | Recipes using unbox                  |


# _autosummary/unbox.missing_install_names.html.md

# unbox.missing_install_names

Finding missing install names

For doing things like:

```pycon
>>> from unbox import print_missing_names
>>> import unbox
>>> print_missing_names(unbox)
bs4
requests
```

#### NOTE
These missing dependencies are real, unpurpose, but don’t affect you.

You can get the set of missing install names as well as the set of install names
that are not used.

What does this mean?

Install names are those you have declared you needed to install the packages: the
`[project] dependencies` of your `pyproject.toml`, or the `[options]
install_requires` of your `setup.cfg` if that’s what you use. Both are read
(`pyproject.toml` first) – see `find_install_names`.

Why are the missing or unused? It has to do with imports. If you declared you needed a
package to be installed (a dependency) but never import it, it’s unused.
More importantly, if you use (that is import) a package, but haven’t listed it in the
names to be installed, that’s a problem for your users.

There’s several problems to solve here (and you have function here to solve them).

One problem: finding the names that are imported. That’s solved by `import_for` and
the many subfunctions like `import_for.third_party`.

Another problem is that the names that are imported are not necessarily the names that
should be installed.
For example, you `import sklearn` but you `pip install scikit-learn`.
That’s annoying. So we need a mapping between import names and install names.

So we provide a default mapping (which we will expand as users notify us, or we
encounter more of those aggravating cases.

That said, we provide ways for users to specify their own map.

You can specify an explicit mapping from import name to install name in the form of a
dict or any other valid `Mapping` instance. You can also add a
`IMPORT_TO_INSTALL_NAME_MAP_FILE` environmental variable pointing to a JSON file path
that will be used if this explicit mapping is not given.
If you do none of those, the system will use the default mapping, which is expressed by
the `unbox/data/dflt_import_to_install_name_map.json` file in the packaged data.

Besides the import vs install name discrepency, there are other reasons you may want
to specify your own map.
You may want to depend on a particular version of a third-party package,
or ensure that the version is greater than a minimum version. So the import names
you extracted need to be mapped to a fuller specification. For example, instead
of just requiring `numpy` you may want to have `numpy >= 1.3` in your
`setup.cfg` or `requirements.txt`.

### Module Attributes

| [`DFLT_INSTALL_NAMES_FINDERS`](_autosummary/unbox.missing_install_names.html.md#unbox.missing_install_names.DFLT_INSTALL_NAMES_FINDERS)   | Sources of declared install names, tried in order by `find_install_names`.   |
|-------------------------------------------------------------------------------|------------------------------------------------------------------------------|

### Functions

| [`dependencies_from_pyproject_content`](_autosummary/unbox.missing_install_names.html.md#unbox.missing_install_names.dependencies_from_pyproject_content)(...[, ...])     | Extract the declared dependencies from `pyproject.toml` text (PEP 621).                                                           |
|------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|
| [`dependencies_from_setup_configs`](_autosummary/unbox.missing_install_names.html.md#unbox.missing_install_names.dependencies_from_setup_configs)(setup_configs)      | Generate all dependencies from a mapping of setup.cfg files.                                                                      |
| [`dependencies_from_setup_configs_content`](_autosummary/unbox.missing_install_names.html.md#unbox.missing_install_names.dependencies_from_setup_configs_content)(...)        | Extract dependencies from a single setup.cfg file content.                                                                        |
| [`dependency_diff`](_autosummary/unbox.missing_install_names.html.md#unbox.missing_install_names.dependency_diff)(install_names[, ...])               | Diff declared install names against the install names the imports call for.                                                       |
| [`dependency_diff_for_pkg`](_autosummary/unbox.missing_install_names.html.md#unbox.missing_install_names.dependency_diff_for_pkg)(pkg[, ...])                 | Get the imported names that are not declared to be installed those names declared to be installed that are not actually imported. |
| [`find_install_names`](_autosummary/unbox.missing_install_names.html.md#unbox.missing_install_names.find_install_names)(pkg, \*[, finders])              | Find the install names (dependencies) a package declares.                                                                         |
| [`get_import_names`](_autosummary/unbox.missing_install_names.html.md#unbox.missing_install_names.get_import_names)(import_names[, imports_finder])    | Get the import names from the given input.                                                                                        |
| `get_import_to_install_name_map`(...)                                                                |                                                                                                                                   |
| `get_install_names`(install_names[, ...])                                                            |                                                                                                                                   |
| `get_module_obj`(module)                                                                             |                                                                                                                                   |
| [`get_pyproject_path`](_autosummary/unbox.missing_install_names.html.md#unbox.missing_install_names.get_pyproject_path)(x)                               | Flexible search for the `pyproject.toml` path for an object x                                                                     |
| [`get_setupcfg_path`](_autosummary/unbox.missing_install_names.html.md#unbox.missing_install_names.get_setupcfg_path)(x)                                | Flexible search for the `setup.cfg` path for an object x                                                                          |
| [`install_names_for_imports`](_autosummary/unbox.missing_install_names.html.md#unbox.missing_install_names.install_names_for_imports)(import_names[, ...])      | Get a set of install names, i.e. names that are used in `pip install PKG_NAME`.                                                   |
| [`install_names_from_pyproject_file`](_autosummary/unbox.missing_install_names.html.md#unbox.missing_install_names.install_names_from_pyproject_file)(pkg, \*[, ...])   | Get dependencies from a package's `pyproject.toml`.                                                                               |
| [`install_names_from_setup_cfg_file`](_autosummary/unbox.missing_install_names.html.md#unbox.missing_install_names.install_names_from_setup_cfg_file)(pkg)              | Get dependencies from setup.cfg file(s).                                                                                          |
| [`install_requires_of_module`](_autosummary/unbox.missing_install_names.html.md#unbox.missing_install_names.install_requires_of_module)(pkg)                     | Get dependencies from setup.cfg file(s).                                                                                          |
| `map_if_found`(mapping, to_map[, strict])                                                            |                                                                                                                                   |
| [`module_requirements_according_to_pyproject`](_autosummary/unbox.missing_install_names.html.md#unbox.missing_install_names.module_requirements_according_to_pyproject)(pkg, \*) | Get dependencies from a package's `pyproject.toml`.                                                                               |
| [`module_requirements_according_to_setupcfg`](_autosummary/unbox.missing_install_names.html.md#unbox.missing_install_names.module_requirements_according_to_setupcfg)(pkg)      | Get dependencies from setup.cfg file(s).                                                                                          |
| `pkg_root_dir_name`(pkg)                                                                             |                                                                                                                                   |
| [`print_missing_names`](_autosummary/unbox.missing_install_names.html.md#unbox.missing_install_names.print_missing_names)(pkg[, ...])                     | See `dependency_diff_for_pkg` for more info (including `exclude_tests`).                                                          |

### Exceptions

| [`ProbablyPythonPathError`](_autosummary/unbox.missing_install_names.html.md#unbox.missing_install_names.ProbablyPythonPathError)   | To raise when a module requested is probably not on the python path   |
|----------------------------------------------------------------------------|-----------------------------------------------------------------------|

### unbox.missing_install_names.DFLT_INSTALL_NAMES_FINDERS *= (<function module_requirements_according_to_pyproject>, <function module_requirements_according_to_setupcfg>)*

Sources of declared install names, tried in order by `find_install_names`.

### *exception* unbox.missing_install_names.ProbablyPythonPathError

Bases: [`ValueError`](https://docs.python.org/3/builtins/exceptions.html#ValueError)

To raise when a module requested is probably not on the python path

### unbox.missing_install_names.dependencies_from_pyproject_content(pyproject_content, , extras=False)

Extract the declared dependencies from `pyproject.toml` text (PEP 621).

By default only the required `[project] dependencies` are yielded:

```pycon
>>> content = '''
... [project]
... name = "proj"
... dependencies = ["requests", "numpy>=1.20"]
... [project.optional-dependencies]
... dev = ["pytest>=7.0"]
... docs = ["sphinx"]
... '''
>>> list(dependencies_from_pyproject_content(content))
['requests', 'numpy>=1.20']
```

Pass `extras=True` to also yield every `[project.optional-dependencies]`
group, or an iterable of group names to pick specific ones:

```pycon
>>> list(dependencies_from_pyproject_content(content, extras=True))
['requests', 'numpy>=1.20', 'pytest>=7.0', 'sphinx']
>>> list(dependencies_from_pyproject_content(content, extras=['dev']))
['requests', 'numpy>=1.20', 'pytest>=7.0']
```

Absent or empty sections simply yield nothing (note that `[build-system]
requires` are build-time requirements, not dependencies, so are ignored):

```pycon
>>> list(dependencies_from_pyproject_content(
...     '[build-system]\nrequires = ["hatchling"]'
... ))
[]
```

* **Return type:**
  [`Iterator`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterator)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)]

### unbox.missing_install_names.dependencies_from_setup_configs(setup_configs)

Generate all dependencies from a mapping of setup.cfg files.

* **Parameters:**
  **setup_configs** ([`Union`](https://docs.python.org/3/library/typing.html#typing.Union)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str), [`Path`](https://docs.python.org/3/library/pathlib.html#pathlib.Path), [`Mapping`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str), [`str`](https://docs.python.org/3/builtins/stdtypes.html#str)], [`Iterable`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterable)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)]]) – Mapping of filepath to setup.cfg file contents
* **Yields:**
  [`str`](https://docs.python.org/3/builtins/stdtypes.html#str) – Individual dependency strings from all setup.cfg files
* **Return type:**
  [*Iterator*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterator)[[*str*](https://docs.python.org/3/builtins/stdtypes.html#str)]

### Example

```pycon
>>> configs = {
...     'proj1/setup.cfg': '[options]\ninstall_requires =\n    requests\n    numpy>=1.20'
... }
>>> list(dependencies_from_setup_configs(configs))
['requests', 'numpy>=1.20']
```

### unbox.missing_install_names.dependencies_from_setup_configs_content(setup_cfg_content)

Extract dependencies from a single setup.cfg file content.

* **Parameters:**
  **setup_cfg_content** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – The text content of a setup.cfg file
* **Yields:**
  [`str`](https://docs.python.org/3/builtins/stdtypes.html#str) – Individual dependency strings
* **Return type:**
  [*Iterator*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterator)[[*str*](https://docs.python.org/3/builtins/stdtypes.html#str)]

### unbox.missing_install_names.dependency_diff(install_names, import_names=None, import_to_install_name_map=None, strict=False, install_names_finder=<function find_install_names>, \*, imports_finder=functools.partial(<function imports_for>, post=<function \_third_party_first_level_names>))

Diff declared install names against the install names the imports call for.

See `dependency_diff_for_pkg`, which is the same thing for a package.

* **Parameters:**
  **imports_finder** ([`Callable`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable)[[[`Union`](https://docs.python.org/3/library/typing.html#typing.Union)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str), [`ModuleType`](https://docs.python.org/3/library/types.html#types.ModuleType)]], [`Iterable`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterable)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)]]) – How to extract import names from `import_names` when it
  is a module/package/path. Defaults to `imports_for.third_party`; pass
  `imports_for.runtime` to leave out imports made only by the package’s tests.

### unbox.missing_install_names.dependency_diff_for_pkg(pkg, import_to_install_name_map=None, strict=False, install_names_finder=<function find_install_names>, \*, exclude_tests=False)

Get the imported names that are not declared to be installed those names declared
to be installed that are not actually imported.

* **Parameters:**
  * **pkg** – An imported package or path to one.
  * **import_to_install_name_map** ([`dict`](https://docs.python.org/3/builtins/stdtypes.html#dict) | [`None`](https://docs.python.org/3/builtins/constants.html#None)) – The mapping between import names and install
    names. This is because import names are not always what you need/want to install.

Options (you won’t have to deal with most of the time):

* **Parameters:**
  * **strict** – Whether you want to allow only those names that are explicitly
    declared in `import_to_install_name_map` or not. (Default is False).
  * **install_names_finder** ([`Callable`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable)[[[`Union`](https://docs.python.org/3/library/typing.html#typing.Union)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str), [`ModuleType`](https://docs.python.org/3/library/types.html#types.ModuleType)]], [`Iterable`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterable)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)]]) – A function that takes the package and finds the
    declared install names (by default looks in `pyproject.toml`, then
    `setup.cfg`, but you can make it look for `requirements.txt`, or where-ever).
  * **exclude_tests** ([`bool`](https://docs.python.org/3/builtins/functions.html#bool)) – Whether to ignore the imports made only by the package’s
    own tests (an in-package `tests/`, `test_*.py`, `conftest.py`: see
    `unbox.DFLT_TEST_MODULE_PATTERNS`). Those imports (`pytest`, `hypothesis`,
    …) are needed to *develop* the package, not to *run* it, so counting them
    reports them as missing *install* requirements. Default is `False`, which
    keeps the historical (whole-source-tree) behavior.
* **Returns:**
  The {import_names - install_names} and {install_names - import_names} sets.

The typical use would be when you want to add missing dependencies in your
install instructions. You would then do:

```pycon
>>> import unbox
>>> missing =  dependency_diff_for_pkg(unbox)[0]
>>> print(*sorted(missing), sep='\n')
bs4
requests
```

#### NOTE
These packages were purposely omitted in the install instructions of
`unbox` because they’re only needed in the internal module
`_acquire_builtin_names` that is for development purporses only.

### unbox.missing_install_names.find_install_names(pkg, \*, finders=(<function module_requirements_according_to_pyproject>, <function module_requirements_according_to_setupcfg>))

Find the install names (dependencies) a package declares.

Tries `pyproject.toml` (PEP 621 `[project] dependencies`) first, then
falls back to `setup.cfg` (`[options] install_requires`) for legacy
projects.

* **Parameters:**
  * **pkg** – An imported package, or a path to one.
  * **finders** – The sources to try, in order. Each is called with `pkg`
    and should return `None` when it has nothing to say.
* **Raises:**
  [**ValueError**](https://docs.python.org/3/builtins/exceptions.html#ValueError) – if none of the `finders` found any declared names.
* **Return type:**
  [`Iterable`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterable)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)]

### unbox.missing_install_names.get_import_names(import_names, imports_finder=functools.partial(<function imports_for>, post=<function \_third_party_first_level_names>))

Get the import names from the given input.

* **Parameters:**
  * **import_names** ([`Union`](https://docs.python.org/3/library/typing.html#typing.Union)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str), [`ModuleType`](https://docs.python.org/3/library/types.html#types.ModuleType), [`Iterable`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterable)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)]]) – The input import names, which can be a string, an iterable,
    or a module/package object.
  * **imports_finder** – A function to find imports in the given input.
* **Return type:**
  [`Iterable`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterable)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)]
* **Returns:**
  A set of import names.

### unbox.missing_install_names.get_pyproject_path(x)

Flexible search for the `pyproject.toml` path for an object x

```pycon
>>> import unbox
>>> get_pyproject_path(unbox).endswith('pyproject.toml')
True
```

* **Return type:**
  [`str`](https://docs.python.org/3/builtins/stdtypes.html#str) | [`None`](https://docs.python.org/3/builtins/constants.html#None)

### unbox.missing_install_names.get_setupcfg_path(x)

Flexible search for the `setup.cfg` path for an object x

```pycon
>>> import unbox
>>> get_setupcfg_path(unbox).endswith('setup.cfg')
True
```

* **Return type:**
  [`str`](https://docs.python.org/3/builtins/stdtypes.html#str) | [`None`](https://docs.python.org/3/builtins/constants.html#None)

### unbox.missing_install_names.install_names_for_imports(import_names, import_to_install_name_map=None, strict=False, \*, imports_finder=functools.partial(<function imports_for>, post=<function \_third_party_first_level_names>))

Get a set of install names, i.e. names that are used in `pip install PKG_NAME`.

There are a few use cases for this.

First, the install names can be different from the names that are used to import
a package. For example, you `import sklearn` but you `pip install scikit-learn`.

Secondly, you may want to depend on a particular version of a third-party package,
or ensure that the version is greater than a minimum version. So the import names
you extracted need to be mapped to a fuller specification. For example, instead
of just requiring `numpy` you may want to have `numpy >= 1.3` in your
`setup.cfg` or `requirements.txt`.

* **Parameters:**
  * **import_names** ([`Union`](https://docs.python.org/3/library/typing.html#typing.Union)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str), [`ModuleType`](https://docs.python.org/3/library/types.html#types.ModuleType), [`Iterable`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterable)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)]]) – An iterable of import names, or a module, package,
    or filepath/folderpath thereof, to be able to extract them
  * **import_to_install_name_map** ([`dict`](https://docs.python.org/3/builtins/stdtypes.html#dict) | [`None`](https://docs.python.org/3/builtins/constants.html#None)) – A dict mapping import names (keys) to install
    names
  * **strict** – Whether to assert that all import_names are in the map
  * **imports_finder** ([`Callable`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable)[[[`Union`](https://docs.python.org/3/library/typing.html#typing.Union)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str), [`ModuleType`](https://docs.python.org/3/library/types.html#types.ModuleType)]], [`Iterable`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterable)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)]]) – How to extract import names when `import_names` is a
    module/package/path rather than an iterable of names. Defaults to
    `imports_for.third_party` (every module under the root); pass
    `imports_for.runtime` to leave out imports made only by the package’s tests.
* **Return type:**
  [`set`](https://docs.python.org/3/builtins/stdtypes.html#set)
* **Returns:**

### unbox.missing_install_names.install_names_from_pyproject_file(pkg, , extras=False)

Get dependencies from a package’s `pyproject.toml`.

* **Parameters:**
  * **pkg** – A module/package object, or a path to a project folder, a package’s
    `__init__.py`, or a `pyproject.toml` file.
  * **extras** ([`Union`](https://docs.python.org/3/library/typing.html#typing.Union)[[`bool`](https://docs.python.org/3/builtins/functions.html#bool), [`Iterable`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterable)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)]]) – Whether to also include `[project.optional-dependencies]`
    (see `dependencies_from_pyproject_content`).
* **Return type:**
  [`Iterable`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterable)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)] | [`None`](https://docs.python.org/3/builtins/constants.html#None)
* **Returns:**
  The list of dependency strings, or `None` if there is no
  `pyproject.toml` to read – so that callers can fall back to another
  source (see `find_install_names`).

### unbox.missing_install_names.install_names_from_setup_cfg_file(pkg)

Get dependencies from setup.cfg file(s).

* **Parameters:**
  **pkg** – 

  Can be:
  - A module/package object
  - A string path to setup.cfg or directory containing it
  - A Mapping of {filepath: setup.cfg_content} for batch processing
* **Return type:**
  [`Iterable`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterable)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)] | [`Iterator`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterator)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)] | [`None`](https://docs.python.org/3/builtins/constants.html#None)
* **Returns:**
  List of dependency strings for single files, Iterator for Mappings, None if not found

### Example

```pycon
>>> # For batch processing multiple setup.cfg contents:
>>> configs = {
...     'proj1/setup.cfg': '[options]\ninstall_requires =\n    requests\n    numpy>=1.20'
... }
>>> list(module_requirements_according_to_setupcfg(configs))
['requests', 'numpy>=1.20']
```

### unbox.missing_install_names.install_requires_of_module(pkg)

Get dependencies from setup.cfg file(s).

* **Parameters:**
  **pkg** – 

  Can be:
  - A module/package object
  - A string path to setup.cfg or directory containing it
  - A Mapping of {filepath: setup.cfg_content} for batch processing
* **Return type:**
  [`Iterable`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterable)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)] | [`Iterator`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterator)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)] | [`None`](https://docs.python.org/3/builtins/constants.html#None)
* **Returns:**
  List of dependency strings for single files, Iterator for Mappings, None if not found

### Example

```pycon
>>> # For batch processing multiple setup.cfg contents:
>>> configs = {
...     'proj1/setup.cfg': '[options]\ninstall_requires =\n    requests\n    numpy>=1.20'
... }
>>> list(module_requirements_according_to_setupcfg(configs))
['requests', 'numpy>=1.20']
```

### unbox.missing_install_names.module_requirements_according_to_pyproject(pkg, , extras=False)

Get dependencies from a package’s `pyproject.toml`.

* **Parameters:**
  * **pkg** – A module/package object, or a path to a project folder, a package’s
    `__init__.py`, or a `pyproject.toml` file.
  * **extras** ([`Union`](https://docs.python.org/3/library/typing.html#typing.Union)[[`bool`](https://docs.python.org/3/builtins/functions.html#bool), [`Iterable`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterable)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)]]) – Whether to also include `[project.optional-dependencies]`
    (see `dependencies_from_pyproject_content`).
* **Return type:**
  [`Iterable`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterable)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)] | [`None`](https://docs.python.org/3/builtins/constants.html#None)
* **Returns:**
  The list of dependency strings, or `None` if there is no
  `pyproject.toml` to read – so that callers can fall back to another
  source (see `find_install_names`).

### unbox.missing_install_names.module_requirements_according_to_setupcfg(pkg)

Get dependencies from setup.cfg file(s).

* **Parameters:**
  **pkg** – 

  Can be:
  - A module/package object
  - A string path to setup.cfg or directory containing it
  - A Mapping of {filepath: setup.cfg_content} for batch processing
* **Return type:**
  [`Iterable`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterable)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)] | [`Iterator`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterator)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)] | [`None`](https://docs.python.org/3/builtins/constants.html#None)
* **Returns:**
  List of dependency strings for single files, Iterator for Mappings, None if not found

### Example

```pycon
>>> # For batch processing multiple setup.cfg contents:
>>> configs = {
...     'proj1/setup.cfg': '[options]\ninstall_requires =\n    requests\n    numpy>=1.20'
... }
>>> list(module_requirements_according_to_setupcfg(configs))
['requests', 'numpy>=1.20']
```

### unbox.missing_install_names.print_missing_names(pkg, import_to_install_name_map=None, strict=False, install_names_finder=<function find_install_names>, \*, exclude_tests=False)

See `dependency_diff_for_pkg` for more info (including `exclude_tests`).

```pycon
>>> import unbox
>>> print_missing_names(unbox)
bs4
requests
```


# _autosummary/unbox.recipes.html.md

# unbox.recipes

Recipes using unbox

### Functions

| `get_py_files`(files)                                                                        |                                                                                                           |
|----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------|
| [`imports_of_package`](_autosummary/unbox.recipes.html.md#unbox.recipes.imports_of_package)(package[, ...])          | Generates (module_dotpath, imported_module_dotpaths) pairs from a package, recursively.                   |
| [`key_and_matched_lines`](_autosummary/unbox.recipes.html.md#unbox.recipes.key_and_matched_lines)(files, pattern)       | Generates (k, line) pairs for every line of every k that has a pattern match                              |
| [`key_and_pattern_counts`](_autosummary/unbox.recipes.html.md#unbox.recipes.key_and_pattern_counts)(files, pattern)      | Generates (k, pattern_counts) pairs from scanning a store of .py files it scans, counting pattern matches |
| [`print_imports_of_package`](_autosummary/unbox.recipes.html.md#unbox.recipes.print_imports_of_package)(package[, ...])    | Prints (module_dotpath, imported_module_dotpaths) pairs from a package, recursively.                      |
| [`print_key_and_matched_lines`](_autosummary/unbox.recipes.html.md#unbox.recipes.print_key_and_matched_lines)(files, pattern) | Print (k, line) pairs for every line of every k that has a pattern match                                  |
| `print_py_files_containing_pattern`(files, pattern)                                          |                                                                                                           |
| [`signature_less_builtin_obj_names`](_autosummary/unbox.recipes.html.md#unbox.recipes.signature_less_builtin_obj_names)([caller])  | Generator of builtin names that don't have a signature                                                    |

### Classes

| [`ModuleStrings`](_autosummary/unbox.recipes.html.md#unbox.recipes.ModuleStrings)(\*args[, read_retry, ...])   | Keys are module dotpaths and values are modules   |
|---------------------------------------------------------------------------------------------|---------------------------------------------------|

### *class* unbox.recipes.ModuleStrings(\*args, read_retry=None, strict_key_errors=False, \*\*kwargs)

Bases: `Store`

Keys are module dotpaths and values are modules

#### is_valid_key(k, \*args, \_\_name='is_valid_key', \*\*kwargs)

`is_valid_key` on the inner key – see `mk_relative_path_store`.

#### validate_key(k, \*args, \_\_name='validate_key', \*\*kwargs)

`validate_key` on the inner key – see `mk_relative_path_store`.

### unbox.recipes.imports_of_package(package, module_dotpath_filt=None, imported_module_dotpath_filt=None, depth=None)

Generates (module_dotpath, imported_module_dotpaths) pairs from a package, recursively.

* **Parameters:**
  * **package** – Module, file, folder, or dotpath of package to root the generation from
  * **module_dotpath_filt** – Filter function for module dotpaths
  * **imported_module_dotpath_filt** – Filter function for imported module dotpaths
  * **depth** – How deep the recursion should be
* **Returns:**
  A generator of (module_dotpath, imported_module_dotpaths) pairs

```pycon
>>> import unbox
>>> for module_dotpath, imported_module_dotpaths in imports_of_package(
...                          unbox,
...                          module_dotpath_filt = lambda x: '__init__' not in x,
...                          depth=1):
...     print(f"{module_dotpath}: {sorted(imported_module_dotpaths)[:3]}"
... )
_acquire_builtin_names: ['bs4', 'contextlib', 'dol.filesys']
missing_install_names: ['collections', 'config2py', 'json']
recipes: ['dol', 'dol.filesys', 'importlib']
base: ['builtins', 'collections', 'contextlib']
```

### unbox.recipes.key_and_matched_lines(files, pattern)

Generates (k, line) pairs for every line of every k that has a pattern match

* **Parameters:**
  * **files** ([`Union`](https://docs.python.org/3/library/typing.html#typing.Union)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str), [`Mapping`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping), [`ModuleType`](https://docs.python.org/3/library/types.html#types.ModuleType)]) – A source of py files (e.g. module, root directory, or a Mapping itself)
  * **pattern** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str) | [`Pattern`](https://docs.python.org/3/library/re.html#re.Pattern)) – A string or re.Pattern to match and count
* **Returns:**
  A generator of (k, pattern_counts) pairs

#### SEE ALSO
key_and_pattern_counts

### unbox.recipes.key_and_pattern_counts(files, pattern)

Generates (k, pattern_counts) pairs from scanning a store of .py files it scans, counting pattern matches

* **Parameters:**
  * **files** ([`Union`](https://docs.python.org/3/library/typing.html#typing.Union)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str), [`Mapping`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping), [`ModuleType`](https://docs.python.org/3/library/types.html#types.ModuleType)]) – A source of py files (e.g. module, root directory, or a Mapping itself)
  * **pattern** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str) | [`Pattern`](https://docs.python.org/3/library/re.html#re.Pattern)) – A string or re.Pattern to match and count
* **Returns:**
  A generator of (k, pattern_counts) pairs

In order to be able to replicate this test we’ll mention a word that has little chance of showing up in an
uncontrolled matter in this this unbox package. This word: supercalifragilisticexpialidocious
It should appear only twice in this current recipes.py – once above, and once when we ask for
key_and_pattern_counts to match it.

Now, let’s see:

```pycon
>>> import unbox
>>> sorted(key_and_pattern_counts(unbox, 'supercalifragilisticexpialidocious'))
[('__init__.py', 0), ('_acquire_builtin_names.py', 0), ('base.py', 0),
('dependencies.py', 0), ('missing_install_names.py', 0), ('recipes.py', 2)]
```

### unbox.recipes.print_imports_of_package(package, module_dotpath_filt=None, imported_module_dotpath_filt=None, depth=None)

Prints (module_dotpath, imported_module_dotpaths) pairs from a package, recursively.

* **Parameters:**
  * **package** – Module, file, folder, or dotpath of package to root the generation from
  * **module_dotpath_filt** – Filter function for module dotpaths
  * **imported_module_dotpath_filt** – Filter function for imported module dotpaths
  * **depth** – How deep the recursion should be
* **Returns:**
  prints the (module_dotpath, imported_module_dotpaths) pairs

### unbox.recipes.print_key_and_matched_lines(files, pattern)

Print (k, line) pairs for every line of every k that has a pattern match

### unbox.recipes.signature_less_builtin_obj_names(caller='signature')

Generator of builtin names that don’t have a signature


# about-this-build.html.md

<!-- generated by epythet -->

# About this build

This documentation was built on **2026-11-21 18:29 UTC** from commit <a href="https://github.com/i2mint/unbox/commit/8d0c2b999997ff41ba1c959f4a7808ec95f35bd2"><code>8d0c2b9</code></a> on branch <code>master</code>, for **unbox 0.1.15** (from <code>pyproject.toml</code>).

#### WARNING
The documentation and the package may be misaligned:

- The documented version (0.1.15) is behind the latest release on PyPI (0.1.16): `pip install unbox` gives newer code than these docs describe.

## Source

|                     |                                                                                                                                                     |
|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|
| Commit              | <a href="https://github.com/i2mint/unbox/commit/8d0c2b999997ff41ba1c959f4a7808ec95f35bd2"><code>8d0c2b999997ff41ba1c959f4a7808ec95f35bd2</code></a> |
| Branch              | <code>master</code>                                                                                                                                 |
| Tags at this commit | none                                                                                                                                                |
| Working tree        | clean                                                                                                                                               |
| Remote              | <code>https://github.com/i2mint/unbox</code>                                                                                                        |

## Continuous integration

|              |                                                                                            |
|--------------|--------------------------------------------------------------------------------------------|
| Repository   | <code>i2mint/unbox</code>                                                                  |
| Run          | <a href="https://github.com/i2mint/unbox/actions/runs/44935653291">44935653291</a>         |
| Ref          | <code>refs/heads/master</code>                                                             |
| Event commit | <code>8d0c2b999997ff41ba1c959f4a7808ec95f35bd2</code> (in the history of the built commit) |

## Tools

|          |         |
|----------|---------|
| epythet  | 0.2.23  |
| Sphinx   | 9.1.1   |
| docutils | 0.22.4  |
| Python   | 3.12.16 |

## Configuration as resolved

|               |                                                                   |
|---------------|-------------------------------------------------------------------|
| theme         | <code>auto</code> (Sphinx theme <code>sphinxawesome_theme</code>) |
| accent        | <code>#765100</code>                                              |
| api_generator | <code>autosummary</code>                                          |
| ignore        | <code>tests/</code>, <code>scrap/</code>, <code>examples/</code>  |
| agent_outputs | <code>true</code>                                                 |
| aggregates    | <code>md</code>                                                   |
| ai_artifacts  | <code>true</code>                                                 |

## Package on PyPI

Latest release: <a href="https://pypi.org/project/unbox/0.1.16/">0.1.16</a>, newer than the documented version (0.1.15).

## Reproduce

```bash
git clone https://github.com/i2mint/unbox && cd unbox
git checkout 8d0c2b999997ff41ba1c959f4a7808ec95f35bd2
pip install "epythet==0.2.23"
epythet quickstart . --ignore tests/ scrap/ examples/
```

The same data, for machines: <a href="build_info.json"><code>build_info.json</code></a> (schema version 1).


# api.html.md

# API reference

| [`unbox`](_autosummary/unbox.html.md#module-unbox)   | Finding imports in code etc.   |
|-----------------------------------------------------------------------|--------------------------------|


