Metadata-Version: 2.1
Name: iext
Version: 0.0.1
Summary: Python import extension metaclass.
Author-Email: ilikecubesnstuff <25328250+ilikecubesnstuff@users.noreply.github.com>
License: MIT
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# iext

Add new imports tied to a specific class.

## Installation

Install this package via `pip`:

```
python -m pip install iext
```

## Usage

To extend the imports within a specific class, subclass `ExtendImports` and add an `__imports__` method with all the extra imports. Everything imported here will be added to the namespace of `self`.

```py
from iext import ExtendImports

class ExampleClass(ExtendImports):
    def __imports__(self):
        import pkg1
        from pkg2 import thing
    
    def example_method(self):
        return self.pkg1.func(self.thing)
```
